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

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

AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi

aws.lambda.getLayerVersion

Explore with Pulumi AI

aws logo

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

AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:lambda/getLayerVersion:getLayerVersion
      arguments:
        # arguments dictionary

    The 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_runtime and compatible_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_runtime and compatible_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_runtime and compatible_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_runtime and compatible_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_runtime and compatible_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_runtime and compatible_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.
    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.
    SigningJobArn string
    ARN of a signing job.
    SigningProfileVersionArn string
    The ARN for a signing profile version.
    SourceCodeHash string
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    SourceCodeSize int
    Size in bytes of the function .zip file.
    Version int
    This Lamba Layer version.
    CompatibleArchitecture string
    CompatibleRuntime string
    Arn string
    ARN of the Lambda Layer with version.
    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.
    SigningJobArn string
    ARN of a signing job.
    SigningProfileVersionArn string
    The ARN for a signing profile version.
    SourceCodeHash string
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    SourceCodeSize int
    Size in bytes of the function .zip file.
    Version int
    This Lamba Layer version.
    CompatibleArchitecture string
    CompatibleRuntime string
    arn String
    ARN of the Lambda Layer with version.
    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.
    signingJobArn String
    ARN of a signing job.
    signingProfileVersionArn String
    The ARN for a signing profile version.
    sourceCodeHash String
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    sourceCodeSize Integer
    Size in bytes of the function .zip file.
    version Integer
    This Lamba Layer version.
    compatibleArchitecture String
    compatibleRuntime String
    arn string
    ARN of the Lambda Layer with version.
    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.
    signingJobArn string
    ARN of a signing job.
    signingProfileVersionArn string
    The ARN for a signing profile version.
    sourceCodeHash string
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    sourceCodeSize number
    Size in bytes of the function .zip file.
    version number
    This Lamba Layer version.
    compatibleArchitecture string
    compatibleRuntime string
    arn str
    ARN of the Lambda Layer with version.
    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_arn str
    ARN of a signing job.
    signing_profile_version_arn str
    The ARN for a signing profile version.
    source_code_hash str
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    source_code_size int
    Size in bytes of the function .zip file.
    version int
    This Lamba Layer version.
    compatible_architecture str
    compatible_runtime str
    arn String
    ARN of the Lambda Layer with version.
    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.
    signingJobArn String
    ARN of a signing job.
    signingProfileVersionArn String
    The ARN for a signing profile version.
    sourceCodeHash String
    Base64-encoded representation of raw SHA-256 sum of the zip file.
    sourceCodeSize Number
    Size in bytes of the function .zip file.
    version Number
    This Lamba 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 aws Terraform Provider.
    aws logo

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

    AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi