Try AWS Native preview for resources not in the classic version.
aws.lambda.LayerVersion
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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
totrue
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:
- Layer
Name 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.- Compatible
Architectures List<string> List of Architectures this layer is compatible with. Currently
x86_64
andarm64
can be specified.- Compatible
Runtimes 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.
- License
Info 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
.- S3Object
Version string 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 totrue
, changing any ofcompatible_architectures
,compatible_runtimes
,description
,filename
,layer_name
,license_info
,s3_bucket
,s3_key
,s3_object_version
, orsource_code_hash
forces deletion of the existing layer version and creation of a new layer version.- Source
Code stringHash Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either
filename
ors3_key
.
- Layer
Name 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.- Compatible
Architectures []string List of Architectures this layer is compatible with. Currently
x86_64
andarm64
can be specified.- Compatible
Runtimes []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.
- License
Info 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
.- S3Object
Version string 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 totrue
, changing any ofcompatible_architectures
,compatible_runtimes
,description
,filename
,layer_name
,license_info
,s3_bucket
,s3_key
,s3_object_version
, orsource_code_hash
forces deletion of the existing layer version and creation of a new layer version.- Source
Code stringHash Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either
filename
ors3_key
.
- layer
Name 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.- compatible
Architectures List<String> List of Architectures this layer is compatible with. Currently
x86_64
andarm64
can be specified.- compatible
Runtimes 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.
- license
Info 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
.- s3Object
Version String Object version containing the function's deployment package. Conflicts with
filename
.- skip
Destroy Boolean Whether to retain the old version of a previously deployed Lambda Layer. Default is
false
. When this is not set totrue
, changing any ofcompatible_architectures
,compatible_runtimes
,description
,filename
,layer_name
,license_info
,s3_bucket
,s3_key
,s3_object_version
, orsource_code_hash
forces deletion of the existing layer version and creation of a new layer version.- source
Code StringHash Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either
filename
ors3_key
.
- layer
Name 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.- compatible
Architectures string[] List of Architectures this layer is compatible with. Currently
x86_64
andarm64
can be specified.- compatible
Runtimes 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.
- license
Info 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
.- s3Object
Version string Object version containing the function's deployment package. Conflicts with
filename
.- skip
Destroy boolean Whether to retain the old version of a previously deployed Lambda Layer. Default is
false
. When this is not set totrue
, changing any ofcompatible_architectures
,compatible_runtimes
,description
,filename
,layer_name
,license_info
,s3_bucket
,s3_key
,s3_object_version
, orsource_code_hash
forces deletion of the existing layer version and creation of a new layer version.- source
Code stringHash Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either
filename
ors3_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
andarm64
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_ strversion 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 totrue
, changing any ofcompatible_architectures
,compatible_runtimes
,description
,filename
,layer_name
,license_info
,s3_bucket
,s3_key
,s3_object_version
, orsource_code_hash
forces deletion of the existing layer version and creation of a new layer version.- source_
code_ strhash Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either
filename
ors3_key
.
- layer
Name 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.- compatible
Architectures List<String> List of Architectures this layer is compatible with. Currently
x86_64
andarm64
can be specified.- compatible
Runtimes 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.
- license
Info 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
.- s3Object
Version String Object version containing the function's deployment package. Conflicts with
filename
.- skip
Destroy Boolean Whether to retain the old version of a previously deployed Lambda Layer. Default is
false
. When this is not set totrue
, changing any ofcompatible_architectures
,compatible_runtimes
,description
,filename
,layer_name
,license_info
,s3_bucket
,s3_key
,s3_object_version
, orsource_code_hash
forces deletion of the existing layer version and creation of a new layer version.- source
Code StringHash Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either
filename
ors3_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.
- Created
Date string Date this resource was created.
- Id string
The provider-assigned unique ID for this managed resource.
- Layer
Arn string ARN of the Lambda Layer without version.
- Signing
Job stringArn ARN of a signing job.
- Signing
Profile stringVersion Arn ARN for a signing profile version.
- Source
Code intSize Size in bytes of the function .zip file.
- Version string
Lambda Layer version.
- Arn string
ARN of the Lambda Layer with version.
- Created
Date string Date this resource was created.
- Id string
The provider-assigned unique ID for this managed resource.
- Layer
Arn string ARN of the Lambda Layer without version.
- Signing
Job stringArn ARN of a signing job.
- Signing
Profile stringVersion Arn ARN for a signing profile version.
- Source
Code intSize Size in bytes of the function .zip file.
- Version string
Lambda Layer version.
- arn String
ARN of the Lambda Layer with version.
- created
Date String Date this resource was created.
- id String
The provider-assigned unique ID for this managed resource.
- layer
Arn String ARN of the Lambda Layer without version.
- signing
Job StringArn ARN of a signing job.
- signing
Profile StringVersion Arn ARN for a signing profile version.
- source
Code IntegerSize Size in bytes of the function .zip file.
- version String
Lambda Layer version.
- arn string
ARN of the Lambda Layer with version.
- created
Date string Date this resource was created.
- id string
The provider-assigned unique ID for this managed resource.
- layer
Arn string ARN of the Lambda Layer without version.
- signing
Job stringArn ARN of a signing job.
- signing
Profile stringVersion Arn ARN for a signing profile version.
- source
Code numberSize 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_ strarn ARN of a signing job.
- signing_
profile_ strversion_ arn ARN for a signing profile version.
- source_
code_ intsize Size in bytes of the function .zip file.
- version str
Lambda Layer version.
- arn String
ARN of the Lambda Layer with version.
- created
Date String Date this resource was created.
- id String
The provider-assigned unique ID for this managed resource.
- layer
Arn String ARN of the Lambda Layer without version.
- signing
Job StringArn ARN of a signing job.
- signing
Profile StringVersion Arn ARN for a signing profile version.
- source
Code NumberSize 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.
- 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.- Compatible
Architectures List<string> List of Architectures this layer is compatible with. Currently
x86_64
andarm64
can be specified.- Compatible
Runtimes List<string> List of Runtimes this layer is compatible with. Up to 5 runtimes can be specified.
- Created
Date string Date this resource was created.
- Description string
Description of what your Lambda Layer does.
- Layer
Arn string ARN of the Lambda Layer without version.
- Layer
Name string Unique name for your Lambda Layer
- License
Info 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
.- S3Object
Version string Object version containing the function's deployment package. Conflicts with
filename
.- Signing
Job stringArn ARN of a signing job.
- Signing
Profile stringVersion Arn 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 totrue
, changing any ofcompatible_architectures
,compatible_runtimes
,description
,filename
,layer_name
,license_info
,s3_bucket
,s3_key
,s3_object_version
, orsource_code_hash
forces deletion of the existing layer version and creation of a new layer version.- Source
Code stringHash Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either
filename
ors3_key
.- Source
Code intSize 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.- Compatible
Architectures []string List of Architectures this layer is compatible with. Currently
x86_64
andarm64
can be specified.- Compatible
Runtimes []string List of Runtimes this layer is compatible with. Up to 5 runtimes can be specified.
- Created
Date string Date this resource was created.
- Description string
Description of what your Lambda Layer does.
- Layer
Arn string ARN of the Lambda Layer without version.
- Layer
Name string Unique name for your Lambda Layer
- License
Info 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
.- S3Object
Version string Object version containing the function's deployment package. Conflicts with
filename
.- Signing
Job stringArn ARN of a signing job.
- Signing
Profile stringVersion Arn 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 totrue
, changing any ofcompatible_architectures
,compatible_runtimes
,description
,filename
,layer_name
,license_info
,s3_bucket
,s3_key
,s3_object_version
, orsource_code_hash
forces deletion of the existing layer version and creation of a new layer version.- Source
Code stringHash Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either
filename
ors3_key
.- Source
Code intSize 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.- compatible
Architectures List<String> List of Architectures this layer is compatible with. Currently
x86_64
andarm64
can be specified.- compatible
Runtimes List<String> List of Runtimes this layer is compatible with. Up to 5 runtimes can be specified.
- created
Date String Date this resource was created.
- description String
Description of what your Lambda Layer does.
- layer
Arn String ARN of the Lambda Layer without version.
- layer
Name String Unique name for your Lambda Layer
- license
Info 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
.- s3Object
Version String Object version containing the function's deployment package. Conflicts with
filename
.- signing
Job StringArn ARN of a signing job.
- signing
Profile StringVersion Arn ARN for a signing profile version.
- skip
Destroy Boolean Whether to retain the old version of a previously deployed Lambda Layer. Default is
false
. When this is not set totrue
, changing any ofcompatible_architectures
,compatible_runtimes
,description
,filename
,layer_name
,license_info
,s3_bucket
,s3_key
,s3_object_version
, orsource_code_hash
forces deletion of the existing layer version and creation of a new layer version.- source
Code StringHash Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either
filename
ors3_key
.- source
Code IntegerSize 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.- compatible
Architectures string[] List of Architectures this layer is compatible with. Currently
x86_64
andarm64
can be specified.- compatible
Runtimes string[] List of Runtimes this layer is compatible with. Up to 5 runtimes can be specified.
- created
Date string Date this resource was created.
- description string
Description of what your Lambda Layer does.
- layer
Arn string ARN of the Lambda Layer without version.
- layer
Name string Unique name for your Lambda Layer
- license
Info 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
.- s3Object
Version string Object version containing the function's deployment package. Conflicts with
filename
.- signing
Job stringArn ARN of a signing job.
- signing
Profile stringVersion Arn ARN for a signing profile version.
- skip
Destroy boolean Whether to retain the old version of a previously deployed Lambda Layer. Default is
false
. When this is not set totrue
, changing any ofcompatible_architectures
,compatible_runtimes
,description
,filename
,layer_name
,license_info
,s3_bucket
,s3_key
,s3_object_version
, orsource_code_hash
forces deletion of the existing layer version and creation of a new layer version.- source
Code stringHash Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either
filename
ors3_key
.- source
Code numberSize 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
andarm64
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_ strversion Object version containing the function's deployment package. Conflicts with
filename
.- signing_
job_ strarn ARN of a signing job.
- signing_
profile_ strversion_ arn 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 totrue
, changing any ofcompatible_architectures
,compatible_runtimes
,description
,filename
,layer_name
,license_info
,s3_bucket
,s3_key
,s3_object_version
, orsource_code_hash
forces deletion of the existing layer version and creation of a new layer version.- source_
code_ strhash Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either
filename
ors3_key
.- source_
code_ intsize 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.- compatible
Architectures List<String> List of Architectures this layer is compatible with. Currently
x86_64
andarm64
can be specified.- compatible
Runtimes List<String> List of Runtimes this layer is compatible with. Up to 5 runtimes can be specified.
- created
Date String Date this resource was created.
- description String
Description of what your Lambda Layer does.
- layer
Arn String ARN of the Lambda Layer without version.
- layer
Name String Unique name for your Lambda Layer
- license
Info 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
.- s3Object
Version String Object version containing the function's deployment package. Conflicts with
filename
.- signing
Job StringArn ARN of a signing job.
- signing
Profile StringVersion Arn ARN for a signing profile version.
- skip
Destroy Boolean Whether to retain the old version of a previously deployed Lambda Layer. Default is
false
. When this is not set totrue
, changing any ofcompatible_architectures
,compatible_runtimes
,description
,filename
,layer_name
,license_info
,s3_bucket
,s3_key
,s3_object_version
, orsource_code_hash
forces deletion of the existing layer version and creation of a new layer version.- source
Code StringHash Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either
filename
ors3_key
.- source
Code NumberSize 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.
Try AWS Native preview for resources not in the classic version.