aws.lambda.LayerVersion
Explore with Pulumi AI
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.
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.
Constructor 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:
- Layer
Name 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. - 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 15 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 - Virtual attribute used to trigger replacement when source code changes. 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
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 []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 15 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 - Virtual attribute used to trigger replacement when source code changes. 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
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. - 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 15 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 - Virtual attribute used to trigger replacement when source code changes. 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
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. - 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 15 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 - Virtual attribute used to trigger replacement when source code changes. 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
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
andarm64
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_ 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 - Virtual attribute used to trigger replacement when source code changes. 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
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. - 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 15 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 - Virtual attribute used to trigger replacement when source code changes. 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.
- Code
Sha256 string - Base64-encoded representation of raw SHA-256 sum of the zip file.
- 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.
- Code
Sha256 string - Base64-encoded representation of raw SHA-256 sum of the zip file.
- 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.
- code
Sha256 String - Base64-encoded representation of raw SHA-256 sum of the zip file.
- 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.
- code
Sha256 string - Base64-encoded representation of raw SHA-256 sum of the zip file.
- 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.
- 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_ 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.
- code
Sha256 String - Base64-encoded representation of raw SHA-256 sum of the zip file.
- 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,
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.
- 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. - Code
Sha256 string - Base64-encoded representation of raw SHA-256 sum of the zip file.
- 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 15 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
The following arguments are optional:
- 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 - Virtual attribute used to trigger replacement when source code changes. 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. - Code
Sha256 string - Base64-encoded representation of raw SHA-256 sum of the zip file.
- 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 15 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
The following arguments are optional:
- 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 - Virtual attribute used to trigger replacement when source code changes. 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. - code
Sha256 String - Base64-encoded representation of raw SHA-256 sum of the zip file.
- 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 15 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
The following arguments are optional:
- 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 - Virtual attribute used to trigger replacement when source code changes. 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. - code
Sha256 string - Base64-encoded representation of raw SHA-256 sum of the zip file.
- 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 15 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
The following arguments are optional:
- 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 - Virtual attribute used to trigger replacement when source code changes. 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. - 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
andarm64
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_ 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 - Virtual attribute used to trigger replacement when source code changes. 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. - code
Sha256 String - Base64-encoded representation of raw SHA-256 sum of the zip file.
- 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 15 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
The following arguments are optional:
- 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 - Virtual attribute used to trigger replacement when source code changes. 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
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.