GetFunction

Provides information about a Lambda Function.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var functionName = config.RequireObject<dynamic>("functionName");
        var existing = Output.Create(Aws.Lambda.GetFunction.InvokeAsync(new Aws.Lambda.GetFunctionArgs
        {
            FunctionName = functionName,
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lambda"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := lambda.LookupFunction(ctx, &lambda.LookupFunctionArgs{
            FunctionName: functionName,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

config = pulumi.Config()
function_name = config.require_object("functionName")
existing = aws.lambda.get_function(function_name=function_name)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const config = new pulumi.Config();
const functionName = config.require("functionName");

const existing = pulumi.output(aws.lambda.getFunction({
    functionName: functionName,
}, { async: true }));

Using GetFunction

function getFunction(args: GetFunctionArgs, opts?: InvokeOptions): Promise<GetFunctionResult>
function  get_function(function_name=None, qualifier=None, tags=None, opts=None)
func LookupFunction(ctx *Context, args *LookupFunctionArgs, opts ...InvokeOption) (*LookupFunctionResult, error)

Note: This function is named LookupFunction in the Go SDK.

public static class GetFunction {
    public static Task<GetFunctionResult> InvokeAsync(GetFunctionArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

FunctionName string

Name of the lambda function.

Qualifier string

Alias name or version number of the lambda function. e.g. $LATEST, my-alias, or 1

Tags Dictionary<string, string>
FunctionName string

Name of the lambda function.

Qualifier string

Alias name or version number of the lambda function. e.g. $LATEST, my-alias, or 1

Tags map[string]string
functionName string

Name of the lambda function.

qualifier string

Alias name or version number of the lambda function. e.g. $LATEST, my-alias, or 1

tags {[key: string]: string}
function_name str

Name of the lambda function.

qualifier str

Alias name or version number of the lambda function. e.g. $LATEST, my-alias, or 1

tags Dict[str, str]

GetFunction Result

The following output properties are available:

Arn string

Unqualified (no :QUALIFIER or :VERSION suffix) Amazon Resource Name (ARN) identifying your Lambda Function. See also qualified_arn.

DeadLetterConfig GetFunctionDeadLetterConfig

Configure the function’s dead letter queue.

Description string

Description of what your Lambda Function does.

Environment GetFunctionEnvironment

The Lambda environment’s configuration settings.

FileSystemConfigs List<GetFunctionFileSystemConfig>

The connection settings for an Amazon EFS file system.

FunctionName string
Handler string

The function entrypoint in your code.

Id string

The provider-assigned unique ID for this managed resource.

InvokeArn string

The ARN to be used for invoking Lambda Function from API Gateway.

KmsKeyArn string

The ARN for the KMS encryption key.

LastModified string

The date this resource was last modified.

Layers List<string>

A list of Lambda Layer ARNs attached to your Lambda Function.

MemorySize int

Amount of memory in MB your Lambda Function can use at runtime.

QualifiedArn string

Qualified (:QUALIFIER or :VERSION suffix) Amazon Resource Name (ARN) identifying your Lambda Function. See also arn.

ReservedConcurrentExecutions int

The amount of reserved concurrent executions for this lambda function or -1 if unreserved.

Role string

IAM role attached to the Lambda Function.

Runtime string

The runtime environment for the Lambda function..

SourceCodeHash string

Base64-encoded representation of raw SHA-256 sum of the zip file.

SourceCodeSize int

The size in bytes of the function .zip file.

Tags Dictionary<string, string>
Timeout int

The function execution time at which Lambda should terminate the function.

TracingConfig GetFunctionTracingConfig

Tracing settings of the function.

Version string

The version of the Lambda function.

VpcConfig GetFunctionVpcConfig

VPC configuration associated with your Lambda function.

Qualifier string
Arn string

Unqualified (no :QUALIFIER or :VERSION suffix) Amazon Resource Name (ARN) identifying your Lambda Function. See also qualified_arn.

DeadLetterConfig GetFunctionDeadLetterConfig

Configure the function’s dead letter queue.

Description string

Description of what your Lambda Function does.

Environment GetFunctionEnvironment

The Lambda environment’s configuration settings.

FileSystemConfigs []GetFunctionFileSystemConfig

The connection settings for an Amazon EFS file system.

FunctionName string
Handler string

The function entrypoint in your code.

Id string

The provider-assigned unique ID for this managed resource.

InvokeArn string

The ARN to be used for invoking Lambda Function from API Gateway.

KmsKeyArn string

The ARN for the KMS encryption key.

LastModified string

The date this resource was last modified.

Layers []string

A list of Lambda Layer ARNs attached to your Lambda Function.

MemorySize int

Amount of memory in MB your Lambda Function can use at runtime.

QualifiedArn string

Qualified (:QUALIFIER or :VERSION suffix) Amazon Resource Name (ARN) identifying your Lambda Function. See also arn.

ReservedConcurrentExecutions int

The amount of reserved concurrent executions for this lambda function or -1 if unreserved.

Role string

IAM role attached to the Lambda Function.

Runtime string

The runtime environment for the Lambda function..

SourceCodeHash string

Base64-encoded representation of raw SHA-256 sum of the zip file.

SourceCodeSize int

The size in bytes of the function .zip file.

Tags map[string]string
Timeout int

The function execution time at which Lambda should terminate the function.

TracingConfig GetFunctionTracingConfig

Tracing settings of the function.

Version string

The version of the Lambda function.

VpcConfig GetFunctionVpcConfig

VPC configuration associated with your Lambda function.

Qualifier string
arn string

Unqualified (no :QUALIFIER or :VERSION suffix) Amazon Resource Name (ARN) identifying your Lambda Function. See also qualified_arn.

deadLetterConfig GetFunctionDeadLetterConfig

Configure the function’s dead letter queue.

description string

Description of what your Lambda Function does.

environment GetFunctionEnvironment

The Lambda environment’s configuration settings.

fileSystemConfigs GetFunctionFileSystemConfig[]

The connection settings for an Amazon EFS file system.

functionName string
handler string

The function entrypoint in your code.

id string

The provider-assigned unique ID for this managed resource.

invokeArn string

The ARN to be used for invoking Lambda Function from API Gateway.

kmsKeyArn string

The ARN for the KMS encryption key.

lastModified string

The date this resource was last modified.

layers string[]

A list of Lambda Layer ARNs attached to your Lambda Function.

memorySize number

Amount of memory in MB your Lambda Function can use at runtime.

qualifiedArn string

Qualified (:QUALIFIER or :VERSION suffix) Amazon Resource Name (ARN) identifying your Lambda Function. See also arn.

reservedConcurrentExecutions number

The amount of reserved concurrent executions for this lambda function or -1 if unreserved.

role string

IAM role attached to the Lambda Function.

runtime string

The runtime environment for the Lambda function..

sourceCodeHash string

Base64-encoded representation of raw SHA-256 sum of the zip file.

sourceCodeSize number

The size in bytes of the function .zip file.

tags {[key: string]: string}
timeout number

The function execution time at which Lambda should terminate the function.

tracingConfig GetFunctionTracingConfig

Tracing settings of the function.

version string

The version of the Lambda function.

vpcConfig GetFunctionVpcConfig

VPC configuration associated with your Lambda function.

qualifier string
arn str

Unqualified (no :QUALIFIER or :VERSION suffix) Amazon Resource Name (ARN) identifying your Lambda Function. See also qualified_arn.

dead_letter_config Dict[GetFunctionDeadLetterConfig]

Configure the function’s dead letter queue.

description str

Description of what your Lambda Function does.

environment Dict[GetFunctionEnvironment]

The Lambda environment’s configuration settings.

file_system_configs List[GetFunctionFileSystemConfig]

The connection settings for an Amazon EFS file system.

function_name str
handler str

The function entrypoint in your code.

id str

The provider-assigned unique ID for this managed resource.

invoke_arn str

The ARN to be used for invoking Lambda Function from API Gateway.

kms_key_arn str

The ARN for the KMS encryption key.

last_modified str

The date this resource was last modified.

layers List[str]

A list of Lambda Layer ARNs attached to your Lambda Function.

memory_size float

Amount of memory in MB your Lambda Function can use at runtime.

qualified_arn str

Qualified (:QUALIFIER or :VERSION suffix) Amazon Resource Name (ARN) identifying your Lambda Function. See also arn.

reserved_concurrent_executions float

The amount of reserved concurrent executions for this lambda function or -1 if unreserved.

role str

IAM role attached to the Lambda Function.

runtime str

The runtime environment for the Lambda function..

source_code_hash str

Base64-encoded representation of raw SHA-256 sum of the zip file.

source_code_size float

The size in bytes of the function .zip file.

tags Dict[str, str]
timeout float

The function execution time at which Lambda should terminate the function.

tracing_config Dict[GetFunctionTracingConfig]

Tracing settings of the function.

version str

The version of the Lambda function.

vpc_config Dict[GetFunctionVpcConfig]

VPC configuration associated with your Lambda function.

qualifier str

Supporting Types

GetFunctionDeadLetterConfig

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

TargetArn string
TargetArn string
targetArn string
target_arn str

GetFunctionEnvironment

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Variables Dictionary<string, string>
Variables map[string]string
variables {[key: string]: string}
variables Dict[str, str]

GetFunctionFileSystemConfig

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Arn string

Unqualified (no :QUALIFIER or :VERSION suffix) Amazon Resource Name (ARN) identifying your Lambda Function. See also qualified_arn.

LocalMountPath string
Arn string

Unqualified (no :QUALIFIER or :VERSION suffix) Amazon Resource Name (ARN) identifying your Lambda Function. See also qualified_arn.

LocalMountPath string
arn string

Unqualified (no :QUALIFIER or :VERSION suffix) Amazon Resource Name (ARN) identifying your Lambda Function. See also qualified_arn.

localMountPath string
arn str

Unqualified (no :QUALIFIER or :VERSION suffix) Amazon Resource Name (ARN) identifying your Lambda Function. See also qualified_arn.

localMountPath str

GetFunctionTracingConfig

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Mode string
Mode string
mode string
mode str

GetFunctionVpcConfig

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

SecurityGroupIds List<string>
SubnetIds List<string>
VpcId string
SecurityGroupIds []string
SubnetIds []string
VpcId string
securityGroupIds string[]
subnetIds string[]
vpcId string
security_group_ids List[str]
subnet_ids List[str]
vpc_id str

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.