AWS v6.60.0 published on Tuesday, Nov 19, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:lambda/getLayerVersion:getLayerVersion
arguments:
# arguments dictionary
The following arguments are supported:
- Layer
Name string - Name of the lambda layer.
- Compatible
Architecture 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. - Compatible
Runtime 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
andcompatible_architecture
. If omitted, the latest available layer version will be used.
- Layer
Name string - Name of the lambda layer.
- Compatible
Architecture 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. - Compatible
Runtime 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
andcompatible_architecture
. If omitted, the latest available layer version will be used.
- layer
Name String - Name of the lambda layer.
- compatible
Architecture 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. - compatible
Runtime 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
andcompatible_architecture
. If omitted, the latest available layer version will be used.
- layer
Name string - Name of the lambda layer.
- compatible
Architecture 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. - compatible
Runtime 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
andcompatible_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
andcompatible_architecture
. If omitted, the latest available layer version will be used.
- layer
Name String - Name of the lambda layer.
- compatible
Architecture 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. - compatible
Runtime 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
andcompatible_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.
- Code
Sha256 string - Base64-encoded representation of raw SHA-256 sum of the zip file.
- Compatible
Architectures List<string> - A list of Architectures the specific Lambda Layer version is compatible with.
- Compatible
Runtimes List<string> - List of Runtimes the specific Lambda Layer version is compatible with.
- Created
Date 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.
- Layer
Arn string - ARN of the Lambda Layer without version.
- Layer
Name string - License
Info string - License info associated with the specific Lambda Layer version.
- Signing
Job stringArn - ARN of a signing job.
- Signing
Profile stringVersion Arn - The ARN for a signing profile version.
- Source
Code stringHash - (Deprecated use
code_sha256
instead) 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 string - Compatible
Runtime string
- Arn string
- ARN of the Lambda Layer with version.
- Code
Sha256 string - Base64-encoded representation of raw SHA-256 sum of the zip file.
- Compatible
Architectures []string - A list of Architectures the specific Lambda Layer version is compatible with.
- Compatible
Runtimes []string - List of Runtimes the specific Lambda Layer version is compatible with.
- Created
Date 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.
- Layer
Arn string - ARN of the Lambda Layer without version.
- Layer
Name string - License
Info string - License info associated with the specific Lambda Layer version.
- Signing
Job stringArn - ARN of a signing job.
- Signing
Profile stringVersion Arn - The ARN for a signing profile version.
- Source
Code stringHash - (Deprecated use
code_sha256
instead) 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 string - Compatible
Runtime string
- arn String
- ARN of the Lambda Layer with version.
- code
Sha256 String - Base64-encoded representation of raw SHA-256 sum of the zip file.
- compatible
Architectures List<String> - A list of Architectures the specific Lambda Layer version is compatible with.
- compatible
Runtimes List<String> - List of Runtimes the specific Lambda Layer version is compatible with.
- created
Date 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.
- layer
Arn String - ARN of the Lambda Layer without version.
- layer
Name String - license
Info String - License info associated with the specific Lambda Layer version.
- signing
Job StringArn - ARN of a signing job.
- signing
Profile StringVersion Arn - The ARN for a signing profile version.
- source
Code StringHash - (Deprecated use
code_sha256
instead) Base64-encoded representation of raw SHA-256 sum of the zip file. - source
Code IntegerSize - Size in bytes of the function .zip file.
- version Integer
- This Lambda Layer version.
- compatible
Architecture String - compatible
Runtime String
- arn string
- ARN of the Lambda Layer with version.
- code
Sha256 string - Base64-encoded representation of raw SHA-256 sum of the zip file.
- compatible
Architectures string[] - A list of Architectures the specific Lambda Layer version is compatible with.
- compatible
Runtimes string[] - List of Runtimes the specific Lambda Layer version is compatible with.
- created
Date 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.
- layer
Arn string - ARN of the Lambda Layer without version.
- layer
Name string - license
Info string - License info associated with the specific Lambda Layer version.
- signing
Job stringArn - ARN of a signing job.
- signing
Profile stringVersion Arn - The ARN for a signing profile version.
- source
Code stringHash - (Deprecated use
code_sha256
instead) Base64-encoded representation of raw SHA-256 sum of the zip file. - source
Code numberSize - Size in bytes of the function .zip file.
- version number
- This Lambda Layer version.
- compatible
Architecture string - compatible
Runtime 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_sha256
instead) 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.
- code
Sha256 String - Base64-encoded representation of raw SHA-256 sum of the zip file.
- compatible
Architectures List<String> - A list of Architectures the specific Lambda Layer version is compatible with.
- compatible
Runtimes List<String> - List of Runtimes the specific Lambda Layer version is compatible with.
- created
Date 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.
- layer
Arn String - ARN of the Lambda Layer without version.
- layer
Name String - license
Info String - License info associated with the specific Lambda Layer version.
- signing
Job StringArn - ARN of a signing job.
- signing
Profile StringVersion Arn - The ARN for a signing profile version.
- source
Code StringHash - (Deprecated use
code_sha256
instead) Base64-encoded representation of raw SHA-256 sum of the zip file. - source
Code NumberSize - Size in bytes of the function .zip file.
- version Number
- This Lambda Layer version.
- compatible
Architecture String - compatible
Runtime String
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.