1. Packages
  2. AWS Classic
  3. API Docs
  4. lambda
  5. LayerVersion

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

aws.lambda.LayerVersion

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

    Provides a Lambda Layer Version resource. Lambda Layers allow you to reuse shared bits of code across multiple lambda functions.

    For information about Lambda Layers and how to use them, see AWS Lambda Layers.

    NOTE: Setting skip_destroy to true means that the AWS Provider will not destroy any layer version, even when running destroy. Layer versions are thus intentional dangling resources that are not managed by the provider and may incur extra expense in your AWS account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const lambdaLayer = new aws.lambda.LayerVersion("lambda_layer", {
        code: new pulumi.asset.FileArchive("lambda_layer_payload.zip"),
        layerName: "lambda_layer_name",
        compatibleRuntimes: ["nodejs16.x"],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    lambda_layer = aws.lambda_.LayerVersion("lambda_layer",
        code=pulumi.FileArchive("lambda_layer_payload.zip"),
        layer_name="lambda_layer_name",
        compatible_runtimes=["nodejs16.x"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lambda.NewLayerVersion(ctx, "lambda_layer", &lambda.LayerVersionArgs{
    			Code:      pulumi.NewFileArchive("lambda_layer_payload.zip"),
    			LayerName: pulumi.String("lambda_layer_name"),
    			CompatibleRuntimes: pulumi.StringArray{
    				pulumi.String("nodejs16.x"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var lambdaLayer = new Aws.Lambda.LayerVersion("lambda_layer", new()
        {
            Code = new FileArchive("lambda_layer_payload.zip"),
            LayerName = "lambda_layer_name",
            CompatibleRuntimes = new[]
            {
                "nodejs16.x",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lambda.LayerVersion;
    import com.pulumi.aws.lambda.LayerVersionArgs;
    import com.pulumi.asset.FileArchive;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var lambdaLayer = new LayerVersion("lambdaLayer", LayerVersionArgs.builder()
                .code(new FileArchive("lambda_layer_payload.zip"))
                .layerName("lambda_layer_name")
                .compatibleRuntimes("nodejs16.x")
                .build());
    
        }
    }
    
    resources:
      lambdaLayer:
        type: aws:lambda:LayerVersion
        name: lambda_layer
        properties:
          code:
            fn::FileArchive: lambda_layer_payload.zip
          layerName: lambda_layer_name
          compatibleRuntimes:
            - nodejs16.x
    

    Specifying the Deployment Package

    AWS Lambda Layers expect source code to be provided as a deployment package whose structure varies depending on which compatible_runtimes this layer specifies. See Runtimes for the valid values of compatible_runtimes.

    Once you have created your deployment package you can specify it either directly as a local file (using the filename argument) or indirectly via Amazon S3 (using the s3_bucket, s3_key and s3_object_version arguments). When providing the deployment package via S3 it may be useful to use the aws.s3.BucketObjectv2 resource to upload it.

    For larger deployment packages it is recommended by Amazon to upload via S3, since the S3 API has better support for uploading large files efficiently.

    Create LayerVersion Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new LayerVersion(name: string, args: LayerVersionArgs, opts?: CustomResourceOptions);
    @overload
    def LayerVersion(resource_name: str,
                     args: LayerVersionArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def LayerVersion(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     layer_name: Optional[str] = None,
                     code: Optional[pulumi.Archive] = None,
                     compatible_architectures: Optional[Sequence[str]] = None,
                     compatible_runtimes: Optional[Sequence[str]] = None,
                     description: Optional[str] = None,
                     license_info: Optional[str] = None,
                     s3_bucket: Optional[str] = None,
                     s3_key: Optional[str] = None,
                     s3_object_version: Optional[str] = None,
                     skip_destroy: Optional[bool] = None,
                     source_code_hash: Optional[str] = None)
    func NewLayerVersion(ctx *Context, name string, args LayerVersionArgs, opts ...ResourceOption) (*LayerVersion, error)
    public LayerVersion(string name, LayerVersionArgs args, CustomResourceOptions? opts = null)
    public LayerVersion(String name, LayerVersionArgs args)
    public LayerVersion(String name, LayerVersionArgs args, CustomResourceOptions options)
    
    type: aws:lambda:LayerVersion
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args LayerVersionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args LayerVersionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args LayerVersionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LayerVersionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LayerVersionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var layerVersionResource = new Aws.Lambda.LayerVersion("layerVersionResource", new()
    {
        LayerName = "string",
        Code = new FileArchive("./path/to/archive"),
        CompatibleArchitectures = new[]
        {
            "string",
        },
        CompatibleRuntimes = new[]
        {
            "string",
        },
        Description = "string",
        LicenseInfo = "string",
        S3Bucket = "string",
        S3Key = "string",
        S3ObjectVersion = "string",
        SkipDestroy = false,
        SourceCodeHash = "string",
    });
    
    example, err := lambda.NewLayerVersion(ctx, "layerVersionResource", &lambda.LayerVersionArgs{
    	LayerName: pulumi.String("string"),
    	Code:      pulumi.NewFileArchive("./path/to/archive"),
    	CompatibleArchitectures: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	CompatibleRuntimes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description:     pulumi.String("string"),
    	LicenseInfo:     pulumi.String("string"),
    	S3Bucket:        pulumi.String("string"),
    	S3Key:           pulumi.String("string"),
    	S3ObjectVersion: pulumi.String("string"),
    	SkipDestroy:     pulumi.Bool(false),
    	SourceCodeHash:  pulumi.String("string"),
    })
    
    var layerVersionResource = new LayerVersion("layerVersionResource", LayerVersionArgs.builder()
        .layerName("string")
        .code(new FileArchive("./path/to/archive"))
        .compatibleArchitectures("string")
        .compatibleRuntimes("string")
        .description("string")
        .licenseInfo("string")
        .s3Bucket("string")
        .s3Key("string")
        .s3ObjectVersion("string")
        .skipDestroy(false)
        .sourceCodeHash("string")
        .build());
    
    layer_version_resource = aws.lambda_.LayerVersion("layerVersionResource",
        layer_name="string",
        code=pulumi.FileArchive("./path/to/archive"),
        compatible_architectures=["string"],
        compatible_runtimes=["string"],
        description="string",
        license_info="string",
        s3_bucket="string",
        s3_key="string",
        s3_object_version="string",
        skip_destroy=False,
        source_code_hash="string")
    
    const layerVersionResource = new aws.lambda.LayerVersion("layerVersionResource", {
        layerName: "string",
        code: new pulumi.asset.FileArchive("./path/to/archive"),
        compatibleArchitectures: ["string"],
        compatibleRuntimes: ["string"],
        description: "string",
        licenseInfo: "string",
        s3Bucket: "string",
        s3Key: "string",
        s3ObjectVersion: "string",
        skipDestroy: false,
        sourceCodeHash: "string",
    });
    
    type: aws:lambda:LayerVersion
    properties:
        code:
            fn::FileArchive: ./path/to/archive
        compatibleArchitectures:
            - string
        compatibleRuntimes:
            - string
        description: string
        layerName: string
        licenseInfo: string
        s3Bucket: string
        s3Key: string
        s3ObjectVersion: string
        skipDestroy: false
        sourceCodeHash: string
    

    LayerVersion Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The LayerVersion resource accepts the following input properties:

    LayerName string

    Unique name for your Lambda Layer

    The following arguments are optional:

    Code Archive
    Path to the function's deployment package within the local filesystem. If defined, The s3_-prefixed options cannot be used.
    CompatibleArchitectures List<string>
    List of Architectures this layer is compatible with. Currently x86_64 and arm64 can be specified.
    CompatibleRuntimes List<string>
    List of Runtimes this layer is compatible with. Up to 15 runtimes can be specified.
    Description string
    Description of what your Lambda Layer does.
    LicenseInfo string
    License info for your Lambda Layer. See License Info.
    S3Bucket string
    S3 bucket location containing the function's deployment package. Conflicts with filename. This bucket must reside in the same AWS region where you are creating the Lambda function.
    S3Key string
    S3 key of an object containing the function's deployment package. Conflicts with filename.
    S3ObjectVersion string
    Object version containing the function's deployment package. Conflicts with filename.
    SkipDestroy bool
    Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_architectures, compatible_runtimes, description, filename, layer_name, license_info, s3_bucket, s3_key, s3_object_version, or source_code_hash forces deletion of the existing layer version and creation of a new layer version.
    SourceCodeHash string
    LayerName string

    Unique name for your Lambda Layer

    The following arguments are optional:

    Code pulumi.Archive
    Path to the function's deployment package within the local filesystem. If defined, The s3_-prefixed options cannot be used.
    CompatibleArchitectures []string
    List of Architectures this layer is compatible with. Currently x86_64 and arm64 can be specified.
    CompatibleRuntimes []string
    List of Runtimes this layer is compatible with. Up to 15 runtimes can be specified.
    Description string
    Description of what your Lambda Layer does.
    LicenseInfo string
    License info for your Lambda Layer. See License Info.
    S3Bucket string
    S3 bucket location containing the function's deployment package. Conflicts with filename. This bucket must reside in the same AWS region where you are creating the Lambda function.
    S3Key string
    S3 key of an object containing the function's deployment package. Conflicts with filename.
    S3ObjectVersion string
    Object version containing the function's deployment package. Conflicts with filename.
    SkipDestroy bool
    Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_architectures, compatible_runtimes, description, filename, layer_name, license_info, s3_bucket, s3_key, s3_object_version, or source_code_hash forces deletion of the existing layer version and creation of a new layer version.
    SourceCodeHash string
    layerName String

    Unique name for your Lambda Layer

    The following arguments are optional:

    code Archive
    Path to the function's deployment package within the local filesystem. If defined, The s3_-prefixed options cannot be used.
    compatibleArchitectures List<String>
    List of Architectures this layer is compatible with. Currently x86_64 and arm64 can be specified.
    compatibleRuntimes List<String>
    List of Runtimes this layer is compatible with. Up to 15 runtimes can be specified.
    description String
    Description of what your Lambda Layer does.
    licenseInfo String
    License info for your Lambda Layer. See License Info.
    s3Bucket String
    S3 bucket location containing the function's deployment package. Conflicts with filename. This bucket must reside in the same AWS region where you are creating the Lambda function.
    s3Key String
    S3 key of an object containing the function's deployment package. Conflicts with filename.
    s3ObjectVersion String
    Object version containing the function's deployment package. Conflicts with filename.
    skipDestroy Boolean
    Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_architectures, compatible_runtimes, description, filename, layer_name, license_info, s3_bucket, s3_key, s3_object_version, or source_code_hash forces deletion of the existing layer version and creation of a new layer version.
    sourceCodeHash String
    layerName string

    Unique name for your Lambda Layer

    The following arguments are optional:

    code pulumi.asset.Archive
    Path to the function's deployment package within the local filesystem. If defined, The s3_-prefixed options cannot be used.
    compatibleArchitectures string[]
    List of Architectures this layer is compatible with. Currently x86_64 and arm64 can be specified.
    compatibleRuntimes string[]
    List of Runtimes this layer is compatible with. Up to 15 runtimes can be specified.
    description string
    Description of what your Lambda Layer does.
    licenseInfo string
    License info for your Lambda Layer. See License Info.
    s3Bucket string
    S3 bucket location containing the function's deployment package. Conflicts with filename. This bucket must reside in the same AWS region where you are creating the Lambda function.
    s3Key string
    S3 key of an object containing the function's deployment package. Conflicts with filename.
    s3ObjectVersion string
    Object version containing the function's deployment package. Conflicts with filename.
    skipDestroy boolean
    Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_architectures, compatible_runtimes, description, filename, layer_name, license_info, s3_bucket, s3_key, s3_object_version, or source_code_hash forces deletion of the existing layer version and creation of a new layer version.
    sourceCodeHash string
    layer_name str

    Unique name for your Lambda Layer

    The following arguments are optional:

    code pulumi.Archive
    Path to the function's deployment package within the local filesystem. If defined, The s3_-prefixed options cannot be used.
    compatible_architectures Sequence[str]
    List of Architectures this layer is compatible with. Currently x86_64 and arm64 can be specified.
    compatible_runtimes Sequence[str]
    List of Runtimes this layer is compatible with. Up to 15 runtimes can be specified.
    description str
    Description of what your Lambda Layer does.
    license_info str
    License info for your Lambda Layer. See License Info.
    s3_bucket str
    S3 bucket location containing the function's deployment package. Conflicts with filename. This bucket must reside in the same AWS region where you are creating the Lambda function.
    s3_key str
    S3 key of an object containing the function's deployment package. Conflicts with filename.
    s3_object_version str
    Object version containing the function's deployment package. Conflicts with filename.
    skip_destroy bool
    Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_architectures, compatible_runtimes, description, filename, layer_name, license_info, s3_bucket, s3_key, s3_object_version, or source_code_hash forces deletion of the existing layer version and creation of a new layer version.
    source_code_hash str
    layerName String

    Unique name for your Lambda Layer

    The following arguments are optional:

    code Archive
    Path to the function's deployment package within the local filesystem. If defined, The s3_-prefixed options cannot be used.
    compatibleArchitectures List<String>
    List of Architectures this layer is compatible with. Currently x86_64 and arm64 can be specified.
    compatibleRuntimes List<String>
    List of Runtimes this layer is compatible with. Up to 15 runtimes can be specified.
    description String
    Description of what your Lambda Layer does.
    licenseInfo String
    License info for your Lambda Layer. See License Info.
    s3Bucket String
    S3 bucket location containing the function's deployment package. Conflicts with filename. This bucket must reside in the same AWS region where you are creating the Lambda function.
    s3Key String
    S3 key of an object containing the function's deployment package. Conflicts with filename.
    s3ObjectVersion String
    Object version containing the function's deployment package. Conflicts with filename.
    skipDestroy Boolean
    Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_architectures, compatible_runtimes, description, filename, layer_name, license_info, s3_bucket, s3_key, s3_object_version, or source_code_hash forces deletion of the existing layer version and creation of a new layer version.
    sourceCodeHash String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the LayerVersion resource produces the following output properties:

    Arn string
    ARN of the Lambda Layer with version.
    CodeSha256 string
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    CreatedDate string
    Date this resource was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LayerArn string
    ARN of the Lambda Layer without version.
    SigningJobArn string
    ARN of a signing job.
    SigningProfileVersionArn string
    ARN for a signing profile version.
    SourceCodeSize int
    Size in bytes of the function .zip file.
    Version string
    Lambda Layer version.
    Arn string
    ARN of the Lambda Layer with version.
    CodeSha256 string
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    CreatedDate string
    Date this resource was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LayerArn string
    ARN of the Lambda Layer without version.
    SigningJobArn string
    ARN of a signing job.
    SigningProfileVersionArn string
    ARN for a signing profile version.
    SourceCodeSize int
    Size in bytes of the function .zip file.
    Version string
    Lambda Layer version.
    arn String
    ARN of the Lambda Layer with version.
    codeSha256 String
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    createdDate String
    Date this resource was created.
    id String
    The provider-assigned unique ID for this managed resource.
    layerArn String
    ARN of the Lambda Layer without version.
    signingJobArn String
    ARN of a signing job.
    signingProfileVersionArn String
    ARN for a signing profile version.
    sourceCodeSize Integer
    Size in bytes of the function .zip file.
    version String
    Lambda Layer version.
    arn string
    ARN of the Lambda Layer with version.
    codeSha256 string
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    createdDate string
    Date this resource was created.
    id string
    The provider-assigned unique ID for this managed resource.
    layerArn string
    ARN of the Lambda Layer without version.
    signingJobArn string
    ARN of a signing job.
    signingProfileVersionArn string
    ARN for a signing profile version.
    sourceCodeSize number
    Size in bytes of the function .zip file.
    version string
    Lambda Layer version.
    arn str
    ARN of the Lambda Layer with version.
    code_sha256 str
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    created_date str
    Date this resource was created.
    id str
    The provider-assigned unique ID for this managed resource.
    layer_arn str
    ARN of the Lambda Layer without version.
    signing_job_arn str
    ARN of a signing job.
    signing_profile_version_arn str
    ARN for a signing profile version.
    source_code_size int
    Size in bytes of the function .zip file.
    version str
    Lambda Layer version.
    arn String
    ARN of the Lambda Layer with version.
    codeSha256 String
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    createdDate String
    Date this resource was created.
    id String
    The provider-assigned unique ID for this managed resource.
    layerArn String
    ARN of the Lambda Layer without version.
    signingJobArn String
    ARN of a signing job.
    signingProfileVersionArn String
    ARN for a signing profile version.
    sourceCodeSize Number
    Size in bytes of the function .zip file.
    version String
    Lambda Layer version.

    Look up Existing LayerVersion Resource

    Get an existing LayerVersion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: LayerVersionState, opts?: CustomResourceOptions): LayerVersion
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            code: Optional[pulumi.Archive] = None,
            code_sha256: Optional[str] = None,
            compatible_architectures: Optional[Sequence[str]] = None,
            compatible_runtimes: Optional[Sequence[str]] = None,
            created_date: Optional[str] = None,
            description: Optional[str] = None,
            layer_arn: Optional[str] = None,
            layer_name: Optional[str] = None,
            license_info: Optional[str] = None,
            s3_bucket: Optional[str] = None,
            s3_key: Optional[str] = None,
            s3_object_version: Optional[str] = None,
            signing_job_arn: Optional[str] = None,
            signing_profile_version_arn: Optional[str] = None,
            skip_destroy: Optional[bool] = None,
            source_code_hash: Optional[str] = None,
            source_code_size: Optional[int] = None,
            version: Optional[str] = None) -> LayerVersion
    func GetLayerVersion(ctx *Context, name string, id IDInput, state *LayerVersionState, opts ...ResourceOption) (*LayerVersion, error)
    public static LayerVersion Get(string name, Input<string> id, LayerVersionState? state, CustomResourceOptions? opts = null)
    public static LayerVersion get(String name, Output<String> id, LayerVersionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    ARN of the Lambda Layer with version.
    Code Archive
    Path to the function's deployment package within the local filesystem. If defined, The s3_-prefixed options cannot be used.
    CodeSha256 string
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    CompatibleArchitectures List<string>
    List of Architectures this layer is compatible with. Currently x86_64 and arm64 can be specified.
    CompatibleRuntimes List<string>
    List of Runtimes this layer is compatible with. Up to 15 runtimes can be specified.
    CreatedDate string
    Date this resource was created.
    Description string
    Description of what your Lambda Layer does.
    LayerArn string
    ARN of the Lambda Layer without version.
    LayerName string

    Unique name for your Lambda Layer

    The following arguments are optional:

    LicenseInfo string
    License info for your Lambda Layer. See License Info.
    S3Bucket string
    S3 bucket location containing the function's deployment package. Conflicts with filename. This bucket must reside in the same AWS region where you are creating the Lambda function.
    S3Key string
    S3 key of an object containing the function's deployment package. Conflicts with filename.
    S3ObjectVersion string
    Object version containing the function's deployment package. Conflicts with filename.
    SigningJobArn string
    ARN of a signing job.
    SigningProfileVersionArn string
    ARN for a signing profile version.
    SkipDestroy bool
    Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_architectures, compatible_runtimes, description, filename, layer_name, license_info, s3_bucket, s3_key, s3_object_version, or source_code_hash forces deletion of the existing layer version and creation of a new layer version.
    SourceCodeHash string
    SourceCodeSize int
    Size in bytes of the function .zip file.
    Version string
    Lambda Layer version.
    Arn string
    ARN of the Lambda Layer with version.
    Code pulumi.Archive
    Path to the function's deployment package within the local filesystem. If defined, The s3_-prefixed options cannot be used.
    CodeSha256 string
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    CompatibleArchitectures []string
    List of Architectures this layer is compatible with. Currently x86_64 and arm64 can be specified.
    CompatibleRuntimes []string
    List of Runtimes this layer is compatible with. Up to 15 runtimes can be specified.
    CreatedDate string
    Date this resource was created.
    Description string
    Description of what your Lambda Layer does.
    LayerArn string
    ARN of the Lambda Layer without version.
    LayerName string

    Unique name for your Lambda Layer

    The following arguments are optional:

    LicenseInfo string
    License info for your Lambda Layer. See License Info.
    S3Bucket string
    S3 bucket location containing the function's deployment package. Conflicts with filename. This bucket must reside in the same AWS region where you are creating the Lambda function.
    S3Key string
    S3 key of an object containing the function's deployment package. Conflicts with filename.
    S3ObjectVersion string
    Object version containing the function's deployment package. Conflicts with filename.
    SigningJobArn string
    ARN of a signing job.
    SigningProfileVersionArn string
    ARN for a signing profile version.
    SkipDestroy bool
    Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_architectures, compatible_runtimes, description, filename, layer_name, license_info, s3_bucket, s3_key, s3_object_version, or source_code_hash forces deletion of the existing layer version and creation of a new layer version.
    SourceCodeHash string
    SourceCodeSize int
    Size in bytes of the function .zip file.
    Version string
    Lambda Layer version.
    arn String
    ARN of the Lambda Layer with version.
    code Archive
    Path to the function's deployment package within the local filesystem. If defined, The s3_-prefixed options cannot be used.
    codeSha256 String
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    compatibleArchitectures List<String>
    List of Architectures this layer is compatible with. Currently x86_64 and arm64 can be specified.
    compatibleRuntimes List<String>
    List of Runtimes this layer is compatible with. Up to 15 runtimes can be specified.
    createdDate String
    Date this resource was created.
    description String
    Description of what your Lambda Layer does.
    layerArn String
    ARN of the Lambda Layer without version.
    layerName String

    Unique name for your Lambda Layer

    The following arguments are optional:

    licenseInfo String
    License info for your Lambda Layer. See License Info.
    s3Bucket String
    S3 bucket location containing the function's deployment package. Conflicts with filename. This bucket must reside in the same AWS region where you are creating the Lambda function.
    s3Key String
    S3 key of an object containing the function's deployment package. Conflicts with filename.
    s3ObjectVersion String
    Object version containing the function's deployment package. Conflicts with filename.
    signingJobArn String
    ARN of a signing job.
    signingProfileVersionArn String
    ARN for a signing profile version.
    skipDestroy Boolean
    Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_architectures, compatible_runtimes, description, filename, layer_name, license_info, s3_bucket, s3_key, s3_object_version, or source_code_hash forces deletion of the existing layer version and creation of a new layer version.
    sourceCodeHash String
    sourceCodeSize Integer
    Size in bytes of the function .zip file.
    version String
    Lambda Layer version.
    arn string
    ARN of the Lambda Layer with version.
    code pulumi.asset.Archive
    Path to the function's deployment package within the local filesystem. If defined, The s3_-prefixed options cannot be used.
    codeSha256 string
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    compatibleArchitectures string[]
    List of Architectures this layer is compatible with. Currently x86_64 and arm64 can be specified.
    compatibleRuntimes string[]
    List of Runtimes this layer is compatible with. Up to 15 runtimes can be specified.
    createdDate string
    Date this resource was created.
    description string
    Description of what your Lambda Layer does.
    layerArn string
    ARN of the Lambda Layer without version.
    layerName string

    Unique name for your Lambda Layer

    The following arguments are optional:

    licenseInfo string
    License info for your Lambda Layer. See License Info.
    s3Bucket string
    S3 bucket location containing the function's deployment package. Conflicts with filename. This bucket must reside in the same AWS region where you are creating the Lambda function.
    s3Key string
    S3 key of an object containing the function's deployment package. Conflicts with filename.
    s3ObjectVersion string
    Object version containing the function's deployment package. Conflicts with filename.
    signingJobArn string
    ARN of a signing job.
    signingProfileVersionArn string
    ARN for a signing profile version.
    skipDestroy boolean
    Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_architectures, compatible_runtimes, description, filename, layer_name, license_info, s3_bucket, s3_key, s3_object_version, or source_code_hash forces deletion of the existing layer version and creation of a new layer version.
    sourceCodeHash string
    sourceCodeSize number
    Size in bytes of the function .zip file.
    version string
    Lambda Layer version.
    arn str
    ARN of the Lambda Layer with version.
    code pulumi.Archive
    Path to the function's deployment package within the local filesystem. If defined, The s3_-prefixed options cannot be used.
    code_sha256 str
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    compatible_architectures Sequence[str]
    List of Architectures this layer is compatible with. Currently x86_64 and arm64 can be specified.
    compatible_runtimes Sequence[str]
    List of Runtimes this layer is compatible with. Up to 15 runtimes can be specified.
    created_date str
    Date this resource was created.
    description str
    Description of what your Lambda Layer does.
    layer_arn str
    ARN of the Lambda Layer without version.
    layer_name str

    Unique name for your Lambda Layer

    The following arguments are optional:

    license_info str
    License info for your Lambda Layer. See License Info.
    s3_bucket str
    S3 bucket location containing the function's deployment package. Conflicts with filename. This bucket must reside in the same AWS region where you are creating the Lambda function.
    s3_key str
    S3 key of an object containing the function's deployment package. Conflicts with filename.
    s3_object_version str
    Object version containing the function's deployment package. Conflicts with filename.
    signing_job_arn str
    ARN of a signing job.
    signing_profile_version_arn str
    ARN for a signing profile version.
    skip_destroy bool
    Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_architectures, compatible_runtimes, description, filename, layer_name, license_info, s3_bucket, s3_key, s3_object_version, or source_code_hash forces deletion of the existing layer version and creation of a new layer version.
    source_code_hash str
    source_code_size int
    Size in bytes of the function .zip file.
    version str
    Lambda Layer version.
    arn String
    ARN of the Lambda Layer with version.
    code Archive
    Path to the function's deployment package within the local filesystem. If defined, The s3_-prefixed options cannot be used.
    codeSha256 String
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    compatibleArchitectures List<String>
    List of Architectures this layer is compatible with. Currently x86_64 and arm64 can be specified.
    compatibleRuntimes List<String>
    List of Runtimes this layer is compatible with. Up to 15 runtimes can be specified.
    createdDate String
    Date this resource was created.
    description String
    Description of what your Lambda Layer does.
    layerArn String
    ARN of the Lambda Layer without version.
    layerName String

    Unique name for your Lambda Layer

    The following arguments are optional:

    licenseInfo String
    License info for your Lambda Layer. See License Info.
    s3Bucket String
    S3 bucket location containing the function's deployment package. Conflicts with filename. This bucket must reside in the same AWS region where you are creating the Lambda function.
    s3Key String
    S3 key of an object containing the function's deployment package. Conflicts with filename.
    s3ObjectVersion String
    Object version containing the function's deployment package. Conflicts with filename.
    signingJobArn String
    ARN of a signing job.
    signingProfileVersionArn String
    ARN for a signing profile version.
    skipDestroy Boolean
    Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_architectures, compatible_runtimes, description, filename, layer_name, license_info, s3_bucket, s3_key, s3_object_version, or source_code_hash forces deletion of the existing layer version and creation of a new layer version.
    sourceCodeHash String
    sourceCodeSize Number
    Size in bytes of the function .zip file.
    version String
    Lambda Layer version.

    Import

    Using pulumi import, import Lambda Layers using arn. For example:

    $ pulumi import aws:lambda/layerVersion:LayerVersion test_layer arn:aws:lambda:_REGION_:_ACCOUNT_ID_:layer:_LAYER_NAME_:_LAYER_VERSION_
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.40.0 published on Wednesday, Jun 12, 2024 by Pulumi