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 v5.41.0 published on Monday, May 15, 2023 by Pulumi

aws.lambda.LayerVersion

Explore with Pulumi AI

aws logo

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

AWS Classic v5.41.0 published on Monday, May 15, 2023 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.

    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.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var lambdaLayer = new Aws.Lambda.LayerVersion("lambdaLayer", new()
        {
            CompatibleRuntimes = new[]
            {
                "nodejs16.x",
            },
            Code = new FileArchive("lambda_layer_payload.zip"),
            LayerName = "lambda_layer_name",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/lambda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lambda.NewLayerVersion(ctx, "lambdaLayer", &lambda.LayerVersionArgs{
    			CompatibleRuntimes: pulumi.StringArray{
    				pulumi.String("nodejs16.x"),
    			},
    			Code:      pulumi.NewFileArchive("lambda_layer_payload.zip"),
    			LayerName: pulumi.String("lambda_layer_name"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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()        
                .compatibleRuntimes("nodejs16.x")
                .code(new FileArchive("lambda_layer_payload.zip"))
                .layerName("lambda_layer_name")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    lambda_layer = aws.lambda_.LayerVersion("lambdaLayer",
        compatible_runtimes=["nodejs16.x"],
        code=pulumi.FileArchive("lambda_layer_payload.zip"),
        layer_name="lambda_layer_name")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const lambdaLayer = new aws.lambda.LayerVersion("lambdaLayer", {
        compatibleRuntimes: ["nodejs16.x"],
        code: new pulumi.asset.FileArchive("lambda_layer_payload.zip"),
        layerName: "lambda_layer_name",
    });
    
    resources:
      lambdaLayer:
        type: aws:lambda:LayerVersion
        properties:
          compatibleRuntimes:
            - nodejs16.x
          code:
            fn::FileArchive: lambda_layer_payload.zip
          layerName: lambda_layer_name
    

    Create LayerVersion Resource

    new LayerVersion(name: string, args: LayerVersionArgs, opts?: CustomResourceOptions);
    @overload
    def LayerVersion(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     code: Optional[pulumi.Archive] = None,
                     compatible_architectures: Optional[Sequence[str]] = None,
                     compatible_runtimes: Optional[Sequence[str]] = None,
                     description: 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,
                     skip_destroy: Optional[bool] = None,
                     source_code_hash: Optional[str] = None)
    @overload
    def LayerVersion(resource_name: str,
                     args: LayerVersionArgs,
                     opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    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 5 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

    Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.

    LayerName string

    Unique name for your Lambda Layer

    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 5 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

    Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.

    layerName String

    Unique name for your Lambda Layer

    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 5 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

    Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.

    layerName string

    Unique name for your Lambda Layer

    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 5 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

    Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.

    layer_name str

    Unique name for your Lambda Layer

    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 5 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

    Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.

    layerName String

    Unique name for your Lambda Layer

    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 5 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

    Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.

    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.

    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.

    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.

    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.

    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.

    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.

    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,
            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.

    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 5 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

    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

    Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.

    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.

    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 5 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

    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

    Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.

    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.

    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 5 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

    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

    Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.

    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.

    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 5 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

    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

    Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.

    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.

    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 5 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

    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

    Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.

    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.

    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 5 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

    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

    Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.

    sourceCodeSize Number

    Size in bytes of the function .zip file.

    version String

    Lambda Layer version.

    Import

    Lambda Layers can be imported using arn.

     $ pulumi import aws:lambda/layerVersion:LayerVersion \
    

    aws_lambda_layer_version.test_layer \

    arn:aws:lambda:REGION:ACCOUNT_ID:layer:LAYER_NAME:LAYER_VERSION

    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 v5.41.0 published on Monday, May 15, 2023 by Pulumi