AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi
aws.lambda.getLayerVersion
Explore with Pulumi AI
Provides information about a Lambda Layer Version.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const layerName = config.require("layerName");
const existing = aws.lambda.getLayerVersion({
    layerName: layerName,
});
import pulumi
import pulumi_aws as aws
config = pulumi.Config()
layer_name = config.require("layerName")
existing = aws.lambda.get_layer_version(layer_name=layer_name)
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		layerName := cfg.Require("layerName")
		_, err := lambda.LookupLayerVersion(ctx, &lambda.LookupLayerVersionArgs{
			LayerName: layerName,
		}, nil)
		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 config = new Config();
    var layerName = config.Require("layerName");
    var existing = Aws.Lambda.GetLayerVersion.Invoke(new()
    {
        LayerName = layerName,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.LambdaFunctions;
import com.pulumi.aws.lambda.inputs.GetLayerVersionArgs;
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) {
        final var config = ctx.config();
        final var layerName = config.get("layerName");
        final var existing = LambdaFunctions.getLayerVersion(GetLayerVersionArgs.builder()
            .layerName(layerName)
            .build());
    }
}
configuration:
  layerName:
    type: string
variables:
  existing:
    fn::invoke:
      function: aws:lambda:getLayerVersion
      arguments:
        layerName: ${layerName}
Using getLayerVersion
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getLayerVersion(args: GetLayerVersionArgs, opts?: InvokeOptions): Promise<GetLayerVersionResult>
function getLayerVersionOutput(args: GetLayerVersionOutputArgs, opts?: InvokeOptions): Output<GetLayerVersionResult>def get_layer_version(compatible_architecture: Optional[str] = None,
                      compatible_runtime: Optional[str] = None,
                      layer_name: Optional[str] = None,
                      version: Optional[int] = None,
                      opts: Optional[InvokeOptions] = None) -> GetLayerVersionResult
def get_layer_version_output(compatible_architecture: Optional[pulumi.Input[str]] = None,
                      compatible_runtime: Optional[pulumi.Input[str]] = None,
                      layer_name: Optional[pulumi.Input[str]] = None,
                      version: Optional[pulumi.Input[int]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetLayerVersionResult]func LookupLayerVersion(ctx *Context, args *LookupLayerVersionArgs, opts ...InvokeOption) (*LookupLayerVersionResult, error)
func LookupLayerVersionOutput(ctx *Context, args *LookupLayerVersionOutputArgs, opts ...InvokeOption) LookupLayerVersionResultOutput> Note: This function is named LookupLayerVersion in the Go SDK.
public static class GetLayerVersion 
{
    public static Task<GetLayerVersionResult> InvokeAsync(GetLayerVersionArgs args, InvokeOptions? opts = null)
    public static Output<GetLayerVersionResult> Invoke(GetLayerVersionInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLayerVersionResult> getLayerVersion(GetLayerVersionArgs args, InvokeOptions options)
public static Output<GetLayerVersionResult> getLayerVersion(GetLayerVersionArgs args, InvokeOptions options)
fn::invoke:
  function: aws:lambda/getLayerVersion:getLayerVersion
  arguments:
    # arguments dictionaryThe following arguments are supported:
- LayerName string
- Name of the lambda layer.
- CompatibleArchitecture string
- Specific architecture the layer version could support. Conflicts with version. If specified, the latest available layer version supporting the provided architecture will be used.
- CompatibleRuntime string
- Specific runtime the layer version must support. Conflicts with version. If specified, the latest available layer version supporting the provided runtime will be used.
- Version int
- Specific layer version. Conflicts with compatible_runtimeandcompatible_architecture. If omitted, the latest available layer version will be used.
- LayerName string
- Name of the lambda layer.
- CompatibleArchitecture string
- Specific architecture the layer version could support. Conflicts with version. If specified, the latest available layer version supporting the provided architecture will be used.
- CompatibleRuntime string
- Specific runtime the layer version must support. Conflicts with version. If specified, the latest available layer version supporting the provided runtime will be used.
- Version int
- Specific layer version. Conflicts with compatible_runtimeandcompatible_architecture. If omitted, the latest available layer version will be used.
- layerName String
- Name of the lambda layer.
- compatibleArchitecture String
- Specific architecture the layer version could support. Conflicts with version. If specified, the latest available layer version supporting the provided architecture will be used.
- compatibleRuntime String
- Specific runtime the layer version must support. Conflicts with version. If specified, the latest available layer version supporting the provided runtime will be used.
- version Integer
- Specific layer version. Conflicts with compatible_runtimeandcompatible_architecture. If omitted, the latest available layer version will be used.
- layerName string
- Name of the lambda layer.
- compatibleArchitecture string
- Specific architecture the layer version could support. Conflicts with version. If specified, the latest available layer version supporting the provided architecture will be used.
- compatibleRuntime string
- Specific runtime the layer version must support. Conflicts with version. If specified, the latest available layer version supporting the provided runtime will be used.
- version number
- Specific layer version. Conflicts with compatible_runtimeandcompatible_architecture. If omitted, the latest available layer version will be used.
- layer_name str
- Name of the lambda layer.
- compatible_architecture str
- Specific architecture the layer version could support. Conflicts with version. If specified, the latest available layer version supporting the provided architecture will be used.
- compatible_runtime str
- Specific runtime the layer version must support. Conflicts with version. If specified, the latest available layer version supporting the provided runtime will be used.
- version int
- Specific layer version. Conflicts with compatible_runtimeandcompatible_architecture. If omitted, the latest available layer version will be used.
- layerName String
- Name of the lambda layer.
- compatibleArchitecture String
- Specific architecture the layer version could support. Conflicts with version. If specified, the latest available layer version supporting the provided architecture will be used.
- compatibleRuntime String
- Specific runtime the layer version must support. Conflicts with version. If specified, the latest available layer version supporting the provided runtime will be used.
- version Number
- Specific layer version. Conflicts with compatible_runtimeandcompatible_architecture. If omitted, the latest available layer version will be used.
getLayerVersion Result
The following output properties are available:
- Arn string
- ARN of the Lambda Layer with version.
- CodeSha256 string
- Base64-encoded representation of raw SHA-256 sum of the zip file.
- CompatibleArchitectures List<string>
- A list of Architectures the specific Lambda Layer version is compatible with.
- CompatibleRuntimes List<string>
- List of Runtimes the specific Lambda Layer version is compatible with.
- CreatedDate string
- Date this resource was created.
- Description string
- Description of the specific Lambda Layer version.
- Id string
- The provider-assigned unique ID for this managed resource.
- LayerArn string
- ARN of the Lambda Layer without version.
- LayerName string
- LicenseInfo string
- License info associated with the specific Lambda Layer version.
- SigningJob stringArn 
- ARN of a signing job.
- SigningProfile stringVersion Arn 
- The ARN for a signing profile version.
- SourceCode stringHash 
- (Deprecated use code_sha256instead) Base64-encoded representation of raw SHA-256 sum of the zip file.
- SourceCode intSize 
- Size in bytes of the function .zip file.
- Version int
- This Lambda Layer version.
- CompatibleArchitecture string
- CompatibleRuntime string
- Arn string
- ARN of the Lambda Layer with version.
- CodeSha256 string
- Base64-encoded representation of raw SHA-256 sum of the zip file.
- CompatibleArchitectures []string
- A list of Architectures the specific Lambda Layer version is compatible with.
- CompatibleRuntimes []string
- List of Runtimes the specific Lambda Layer version is compatible with.
- CreatedDate string
- Date this resource was created.
- Description string
- Description of the specific Lambda Layer version.
- Id string
- The provider-assigned unique ID for this managed resource.
- LayerArn string
- ARN of the Lambda Layer without version.
- LayerName string
- LicenseInfo string
- License info associated with the specific Lambda Layer version.
- SigningJob stringArn 
- ARN of a signing job.
- SigningProfile stringVersion Arn 
- The ARN for a signing profile version.
- SourceCode stringHash 
- (Deprecated use code_sha256instead) Base64-encoded representation of raw SHA-256 sum of the zip file.
- SourceCode intSize 
- Size in bytes of the function .zip file.
- Version int
- This Lambda Layer version.
- CompatibleArchitecture string
- CompatibleRuntime string
- arn String
- ARN of the Lambda Layer with version.
- codeSha256 String
- Base64-encoded representation of raw SHA-256 sum of the zip file.
- compatibleArchitectures List<String>
- A list of Architectures the specific Lambda Layer version is compatible with.
- compatibleRuntimes List<String>
- List of Runtimes the specific Lambda Layer version is compatible with.
- createdDate String
- Date this resource was created.
- description String
- Description of the specific Lambda Layer version.
- id String
- The provider-assigned unique ID for this managed resource.
- layerArn String
- ARN of the Lambda Layer without version.
- layerName String
- licenseInfo String
- License info associated with the specific Lambda Layer version.
- signingJob StringArn 
- ARN of a signing job.
- signingProfile StringVersion Arn 
- The ARN for a signing profile version.
- sourceCode StringHash 
- (Deprecated use code_sha256instead) Base64-encoded representation of raw SHA-256 sum of the zip file.
- sourceCode IntegerSize 
- Size in bytes of the function .zip file.
- version Integer
- This Lambda Layer version.
- compatibleArchitecture String
- compatibleRuntime String
- arn string
- ARN of the Lambda Layer with version.
- codeSha256 string
- Base64-encoded representation of raw SHA-256 sum of the zip file.
- compatibleArchitectures string[]
- A list of Architectures the specific Lambda Layer version is compatible with.
- compatibleRuntimes string[]
- List of Runtimes the specific Lambda Layer version is compatible with.
- createdDate string
- Date this resource was created.
- description string
- Description of the specific Lambda Layer version.
- id string
- The provider-assigned unique ID for this managed resource.
- layerArn string
- ARN of the Lambda Layer without version.
- layerName string
- licenseInfo string
- License info associated with the specific Lambda Layer version.
- signingJob stringArn 
- ARN of a signing job.
- signingProfile stringVersion Arn 
- The ARN for a signing profile version.
- sourceCode stringHash 
- (Deprecated use code_sha256instead) Base64-encoded representation of raw SHA-256 sum of the zip file.
- sourceCode numberSize 
- Size in bytes of the function .zip file.
- version number
- This Lambda Layer version.
- compatibleArchitecture string
- compatibleRuntime string
- arn str
- ARN of the Lambda Layer with version.
- code_sha256 str
- Base64-encoded representation of raw SHA-256 sum of the zip file.
- compatible_architectures Sequence[str]
- A list of Architectures the specific Lambda Layer version is compatible with.
- compatible_runtimes Sequence[str]
- List of Runtimes the specific Lambda Layer version is compatible with.
- created_date str
- Date this resource was created.
- description str
- Description of the specific Lambda Layer version.
- id str
- The provider-assigned unique ID for this managed resource.
- layer_arn str
- ARN of the Lambda Layer without version.
- layer_name str
- license_info str
- License info associated with the specific Lambda Layer version.
- signing_job_ strarn 
- ARN of a signing job.
- signing_profile_ strversion_ arn 
- The ARN for a signing profile version.
- source_code_ strhash 
- (Deprecated use code_sha256instead) Base64-encoded representation of raw SHA-256 sum of the zip file.
- source_code_ intsize 
- Size in bytes of the function .zip file.
- version int
- This Lambda Layer version.
- compatible_architecture str
- compatible_runtime str
- arn String
- ARN of the Lambda Layer with version.
- codeSha256 String
- Base64-encoded representation of raw SHA-256 sum of the zip file.
- compatibleArchitectures List<String>
- A list of Architectures the specific Lambda Layer version is compatible with.
- compatibleRuntimes List<String>
- List of Runtimes the specific Lambda Layer version is compatible with.
- createdDate String
- Date this resource was created.
- description String
- Description of the specific Lambda Layer version.
- id String
- The provider-assigned unique ID for this managed resource.
- layerArn String
- ARN of the Lambda Layer without version.
- layerName String
- licenseInfo String
- License info associated with the specific Lambda Layer version.
- signingJob StringArn 
- ARN of a signing job.
- signingProfile StringVersion Arn 
- The ARN for a signing profile version.
- sourceCode StringHash 
- (Deprecated use code_sha256instead) Base64-encoded representation of raw SHA-256 sum of the zip file.
- sourceCode NumberSize 
- Size in bytes of the function .zip file.
- version Number
- This Lambda Layer version.
- compatibleArchitecture String
- compatibleRuntime String
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.