1. Packages
  2. AWS Native
  3. API Docs
  4. lambda
  5. Function

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.103.0 published on Monday, Apr 22, 2024 by Pulumi

aws-native.lambda.Function

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.103.0 published on Monday, Apr 22, 2024 by Pulumi

    The AWS::Lambda::Function resource creates a Lambda function. To create a function, you need a deployment package and an execution role. The deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use AWS services, such as Amazon CloudWatch Logs for log streaming and AWS X-Ray for request tracing. You set the package type to Image if the deployment package is a container image. For a container image, the code property must include the URI of a container image in the Amazon ECR registry. You do not need to specify the handler and runtime properties. You set the package type to Zip if the deployment package is a .zip file archive. For a .zip file archive, the code property specifies the location of the .zip file. You must also specify the handler and runtime properties. For a Python example, see Deploy Python Lambda functions with .zip file archives. You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function, specify the ARN of a code-signing configuration. When a user attempts to deploy a code package with UpdateFunctionCode, Lambda checks that the code package has a valid signature from a trusted publisher. The code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function. Note that you configure provisioned concurrency on a AWS::Lambda::Version or a AWS::Lambda::Alias. For a complete introduction to Lambda functions, see What is Lambda? in the Lambda developer guide.

    Example Usage

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var function = new AwsNative.Lambda.Function("function", new()
        {
            Handler = "index.handler",
            Role = "arn:aws:iam::123456789012:role/lambda-role",
            Code = new AwsNative.Lambda.Inputs.FunctionCodeArgs
            {
                ZipFile = @"exports.handler = function(event){
        console.log(JSON.stringify(event, null, 2))
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello from Lambda!')
        }
        return response
    };
    ",
            },
            Runtime = "nodejs18.x",
            TracingConfig = new AwsNative.Lambda.Inputs.FunctionTracingConfigArgs
            {
                Mode = AwsNative.Lambda.FunctionTracingConfigMode.Active,
            },
        });
    
        var version = new AwsNative.Lambda.Version("version", new()
        {
            FunctionName = function.Id,
            Description = "v1",
        });
    
        var @alias = new AwsNative.Lambda.Alias("alias", new()
        {
            FunctionName = function.Id,
            FunctionVersion = version.Version,
            Name = "BLUE",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/lambda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		function, err := lambda.NewFunction(ctx, "function", &lambda.FunctionArgs{
    			Handler: pulumi.String("index.handler"),
    			Role:    pulumi.String("arn:aws:iam::123456789012:role/lambda-role"),
    			Code: &lambda.FunctionCodeArgs{
    				ZipFile: pulumi.String(`exports.handler = function(event){
        console.log(JSON.stringify(event, null, 2))
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello from Lambda!')
        }
        return response
    };
    `),
    			},
    			Runtime: pulumi.String("nodejs18.x"),
    			TracingConfig: &lambda.FunctionTracingConfigArgs{
    				Mode: lambda.FunctionTracingConfigModeActive,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		version, err := lambda.NewVersion(ctx, "version", &lambda.VersionArgs{
    			FunctionName: function.ID(),
    			Description:  pulumi.String("v1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = lambda.NewAlias(ctx, "alias", &lambda.AliasArgs{
    			FunctionName:    function.ID(),
    			FunctionVersion: version.Version,
    			Name:            pulumi.String("BLUE"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    function = aws_native.lambda_.Function("function",
        handler="index.handler",
        role="arn:aws:iam::123456789012:role/lambda-role",
        code=aws_native.lambda_.FunctionCodeArgs(
            zip_file="""exports.handler = function(event){
        console.log(JSON.stringify(event, null, 2))
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello from Lambda!')
        }
        return response
    };
    """,
        ),
        runtime="nodejs18.x",
        tracing_config=aws_native.lambda_.FunctionTracingConfigArgs(
            mode=aws_native.lambda_.FunctionTracingConfigMode.ACTIVE,
        ))
    version = aws_native.lambda_.Version("version",
        function_name=function.id,
        description="v1")
    alias = aws_native.lambda_.Alias("alias",
        function_name=function.id,
        function_version=version.version,
        name="BLUE")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const _function = new aws_native.lambda.Function("function", {
        handler: "index.handler",
        role: "arn:aws:iam::123456789012:role/lambda-role",
        code: {
            zipFile: `exports.handler = function(event){
        console.log(JSON.stringify(event, null, 2))
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello from Lambda!')
        }
        return response
    };
    `,
        },
        runtime: "nodejs18.x",
        tracingConfig: {
            mode: aws_native.lambda.FunctionTracingConfigMode.Active,
        },
    });
    const version = new aws_native.lambda.Version("version", {
        functionName: _function.id,
        description: "v1",
    });
    const alias = new aws_native.lambda.Alias("alias", {
        functionName: _function.id,
        functionVersion: version.version,
        name: "BLUE",
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var function = new AwsNative.Lambda.Function("function", new()
        {
            Handler = "index.handler",
            Role = "arn:aws:iam::123456789012:role/lambda-role",
            Code = new AwsNative.Lambda.Inputs.FunctionCodeArgs
            {
                ZipFile = @"exports.handler = function(event){
        console.log(JSON.stringify(event, null, 2))
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello again from Lambda!')
        }
        return response
    }
    ",
            },
            Runtime = "nodejs18.x",
            TracingConfig = new AwsNative.Lambda.Inputs.FunctionTracingConfigArgs
            {
                Mode = AwsNative.Lambda.FunctionTracingConfigMode.Active,
            },
        });
    
        var version = new AwsNative.Lambda.Version("version", new()
        {
            FunctionName = function.Id,
            Description = "v1",
        });
    
        var newVersion = new AwsNative.Lambda.Version("newVersion", new()
        {
            FunctionName = function.Id,
            Description = "v2",
        });
    
        var @alias = new AwsNative.Lambda.Alias("alias", new()
        {
            FunctionName = function.Id,
            FunctionVersion = newVersion.Version,
            Name = "BLUE",
            RoutingConfig = new AwsNative.Lambda.Inputs.AliasRoutingConfigurationArgs
            {
                AdditionalVersionWeights = new[]
                {
                    new AwsNative.Lambda.Inputs.AliasVersionWeightArgs
                    {
                        FunctionVersion = version.Version,
                        FunctionWeight = 0.5,
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/lambda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		function, err := lambda.NewFunction(ctx, "function", &lambda.FunctionArgs{
    			Handler: pulumi.String("index.handler"),
    			Role:    pulumi.String("arn:aws:iam::123456789012:role/lambda-role"),
    			Code: &lambda.FunctionCodeArgs{
    				ZipFile: pulumi.String(`exports.handler = function(event){
        console.log(JSON.stringify(event, null, 2))
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello again from Lambda!')
        }
        return response
    }
    `),
    			},
    			Runtime: pulumi.String("nodejs18.x"),
    			TracingConfig: &lambda.FunctionTracingConfigArgs{
    				Mode: lambda.FunctionTracingConfigModeActive,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		version, err := lambda.NewVersion(ctx, "version", &lambda.VersionArgs{
    			FunctionName: function.ID(),
    			Description:  pulumi.String("v1"),
    		})
    		if err != nil {
    			return err
    		}
    		newVersion, err := lambda.NewVersion(ctx, "newVersion", &lambda.VersionArgs{
    			FunctionName: function.ID(),
    			Description:  pulumi.String("v2"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = lambda.NewAlias(ctx, "alias", &lambda.AliasArgs{
    			FunctionName:    function.ID(),
    			FunctionVersion: newVersion.Version,
    			Name:            pulumi.String("BLUE"),
    			RoutingConfig: &lambda.AliasRoutingConfigurationArgs{
    				AdditionalVersionWeights: []lambda.AliasVersionWeightArgs{
    					{
    						FunctionVersion: version.Version,
    						FunctionWeight:  pulumi.Float64(0.5),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    function = aws_native.lambda_.Function("function",
        handler="index.handler",
        role="arn:aws:iam::123456789012:role/lambda-role",
        code=aws_native.lambda_.FunctionCodeArgs(
            zip_file="""exports.handler = function(event){
        console.log(JSON.stringify(event, null, 2))
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello again from Lambda!')
        }
        return response
    }
    """,
        ),
        runtime="nodejs18.x",
        tracing_config=aws_native.lambda_.FunctionTracingConfigArgs(
            mode=aws_native.lambda_.FunctionTracingConfigMode.ACTIVE,
        ))
    version = aws_native.lambda_.Version("version",
        function_name=function.id,
        description="v1")
    new_version = aws_native.lambda_.Version("newVersion",
        function_name=function.id,
        description="v2")
    alias = aws_native.lambda_.Alias("alias",
        function_name=function.id,
        function_version=new_version.version,
        name="BLUE",
        routing_config=aws_native.lambda_.AliasRoutingConfigurationArgs(
            additional_version_weights=[aws_native.lambda_.AliasVersionWeightArgs(
                function_version=version.version,
                function_weight=0.5,
            )],
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const _function = new aws_native.lambda.Function("function", {
        handler: "index.handler",
        role: "arn:aws:iam::123456789012:role/lambda-role",
        code: {
            zipFile: `exports.handler = function(event){
        console.log(JSON.stringify(event, null, 2))
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello again from Lambda!')
        }
        return response
    }
    `,
        },
        runtime: "nodejs18.x",
        tracingConfig: {
            mode: aws_native.lambda.FunctionTracingConfigMode.Active,
        },
    });
    const version = new aws_native.lambda.Version("version", {
        functionName: _function.id,
        description: "v1",
    });
    const newVersion = new aws_native.lambda.Version("newVersion", {
        functionName: _function.id,
        description: "v2",
    });
    const alias = new aws_native.lambda.Alias("alias", {
        functionName: _function.id,
        functionVersion: newVersion.version,
        name: "BLUE",
        routingConfig: {
            additionalVersionWeights: [{
                functionVersion: version.version,
                functionWeight: 0.5,
            }],
        },
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var function = new AwsNative.Lambda.Function("function", new()
        {
            Handler = "index.handler",
            Role = "arn:aws:iam::123456789012:role/lambda-role",
            Code = new AwsNative.Lambda.Inputs.FunctionCodeArgs
            {
                ZipFile = @"exports.handler = async (event) => {
        console.log(JSON.stringify(event, null, 2));
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello from Lambda!'),
        };
        return response;
    };
    ",
            },
            Runtime = "nodejs18.x",
            TracingConfig = new AwsNative.Lambda.Inputs.FunctionTracingConfigArgs
            {
                Mode = AwsNative.Lambda.FunctionTracingConfigMode.Active,
            },
        });
    
        var version = new AwsNative.Lambda.Version("version", new()
        {
            FunctionName = function.Id,
        });
    
        var asyncconfig = new AwsNative.Lambda.EventInvokeConfig("asyncconfig", new()
        {
            DestinationConfig = new AwsNative.Lambda.Inputs.EventInvokeConfigDestinationConfigArgs
            {
                OnFailure = new AwsNative.Lambda.Inputs.EventInvokeConfigOnFailureArgs
                {
                    Destination = "arn:aws:sqs:us-east-2:123456789012:dlq",
                },
                OnSuccess = new AwsNative.Lambda.Inputs.EventInvokeConfigOnSuccessArgs
                {
                    Destination = "arn:aws:sqs:us-east-2:123456789012:dlq",
                },
            },
            FunctionName = function.Id,
            MaximumEventAgeInSeconds = 300,
            MaximumRetryAttempts = 1,
            Qualifier = version.Version,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/lambda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		function, err := lambda.NewFunction(ctx, "function", &lambda.FunctionArgs{
    			Handler: pulumi.String("index.handler"),
    			Role:    pulumi.String("arn:aws:iam::123456789012:role/lambda-role"),
    			Code: &lambda.FunctionCodeArgs{
    				ZipFile: pulumi.String(`exports.handler = async (event) => {
        console.log(JSON.stringify(event, null, 2));
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello from Lambda!'),
        };
        return response;
    };
    `),
    			},
    			Runtime: pulumi.String("nodejs18.x"),
    			TracingConfig: &lambda.FunctionTracingConfigArgs{
    				Mode: lambda.FunctionTracingConfigModeActive,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		version, err := lambda.NewVersion(ctx, "version", &lambda.VersionArgs{
    			FunctionName: function.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = lambda.NewEventInvokeConfig(ctx, "asyncconfig", &lambda.EventInvokeConfigArgs{
    			DestinationConfig: &lambda.EventInvokeConfigDestinationConfigArgs{
    				OnFailure: &lambda.EventInvokeConfigOnFailureArgs{
    					Destination: pulumi.String("arn:aws:sqs:us-east-2:123456789012:dlq"),
    				},
    				OnSuccess: &lambda.EventInvokeConfigOnSuccessArgs{
    					Destination: pulumi.String("arn:aws:sqs:us-east-2:123456789012:dlq"),
    				},
    			},
    			FunctionName:             function.ID(),
    			MaximumEventAgeInSeconds: pulumi.Int(300),
    			MaximumRetryAttempts:     pulumi.Int(1),
    			Qualifier:                version.Version,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    function = aws_native.lambda_.Function("function",
        handler="index.handler",
        role="arn:aws:iam::123456789012:role/lambda-role",
        code=aws_native.lambda_.FunctionCodeArgs(
            zip_file="""exports.handler = async (event) => {
        console.log(JSON.stringify(event, null, 2));
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello from Lambda!'),
        };
        return response;
    };
    """,
        ),
        runtime="nodejs18.x",
        tracing_config=aws_native.lambda_.FunctionTracingConfigArgs(
            mode=aws_native.lambda_.FunctionTracingConfigMode.ACTIVE,
        ))
    version = aws_native.lambda_.Version("version", function_name=function.id)
    asyncconfig = aws_native.lambda_.EventInvokeConfig("asyncconfig",
        destination_config=aws_native.lambda_.EventInvokeConfigDestinationConfigArgs(
            on_failure=aws_native.lambda_.EventInvokeConfigOnFailureArgs(
                destination="arn:aws:sqs:us-east-2:123456789012:dlq",
            ),
            on_success=aws_native.lambda_.EventInvokeConfigOnSuccessArgs(
                destination="arn:aws:sqs:us-east-2:123456789012:dlq",
            ),
        ),
        function_name=function.id,
        maximum_event_age_in_seconds=300,
        maximum_retry_attempts=1,
        qualifier=version.version)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const _function = new aws_native.lambda.Function("function", {
        handler: "index.handler",
        role: "arn:aws:iam::123456789012:role/lambda-role",
        code: {
            zipFile: `exports.handler = async (event) => {
        console.log(JSON.stringify(event, null, 2));
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello from Lambda!'),
        };
        return response;
    };
    `,
        },
        runtime: "nodejs18.x",
        tracingConfig: {
            mode: aws_native.lambda.FunctionTracingConfigMode.Active,
        },
    });
    const version = new aws_native.lambda.Version("version", {functionName: _function.id});
    const asyncconfig = new aws_native.lambda.EventInvokeConfig("asyncconfig", {
        destinationConfig: {
            onFailure: {
                destination: "arn:aws:sqs:us-east-2:123456789012:dlq",
            },
            onSuccess: {
                destination: "arn:aws:sqs:us-east-2:123456789012:dlq",
            },
        },
        functionName: _function.id,
        maximumEventAgeInSeconds: 300,
        maximumRetryAttempts: 1,
        qualifier: version.version,
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var primer = new AwsNative.Lambda.Function("primer", new()
        {
            Runtime = "nodejs18.x",
            Role = "arn:aws:iam::123456789012:role/lambda-role",
            Handler = "index.handler",
            Code = new AwsNative.Lambda.Inputs.FunctionCodeArgs
            {
                ZipFile = @"const { S3Client, ListBucketsCommand } = require(""@aws-sdk/client-s3"");
    const s3 = new S3Client({ region: ""us-east-1"" }); // replace ""us-east-1"" with your AWS region
    
    exports.handler = async function(event) {
      const command = new ListBucketsCommand({});
      const response = await s3.send(command);
      return response.Buckets;
    };
    ",
            },
            Description = "List Amazon S3 buckets in us-east-1.",
            TracingConfig = new AwsNative.Lambda.Inputs.FunctionTracingConfigArgs
            {
                Mode = AwsNative.Lambda.FunctionTracingConfigMode.Active,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/lambda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lambda.NewFunction(ctx, "primer", &lambda.FunctionArgs{
    			Runtime: pulumi.String("nodejs18.x"),
    			Role:    pulumi.String("arn:aws:iam::123456789012:role/lambda-role"),
    			Handler: pulumi.String("index.handler"),
    			Code: &lambda.FunctionCodeArgs{
    				ZipFile: pulumi.String(`const { S3Client, ListBucketsCommand } = require("@aws-sdk/client-s3");
    const s3 = new S3Client({ region: "us-east-1" }); // replace "us-east-1" with your AWS region
    
    exports.handler = async function(event) {
      const command = new ListBucketsCommand({});
      const response = await s3.send(command);
      return response.Buckets;
    };
    `),
    			},
    			Description: pulumi.String("List Amazon S3 buckets in us-east-1."),
    			TracingConfig: &lambda.FunctionTracingConfigArgs{
    				Mode: lambda.FunctionTracingConfigModeActive,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    primer = aws_native.lambda_.Function("primer",
        runtime="nodejs18.x",
        role="arn:aws:iam::123456789012:role/lambda-role",
        handler="index.handler",
        code=aws_native.lambda_.FunctionCodeArgs(
            zip_file="""const { S3Client, ListBucketsCommand } = require("@aws-sdk/client-s3");
    const s3 = new S3Client({ region: "us-east-1" }); // replace "us-east-1" with your AWS region
    
    exports.handler = async function(event) {
      const command = new ListBucketsCommand({});
      const response = await s3.send(command);
      return response.Buckets;
    };
    """,
        ),
        description="List Amazon S3 buckets in us-east-1.",
        tracing_config=aws_native.lambda_.FunctionTracingConfigArgs(
            mode=aws_native.lambda_.FunctionTracingConfigMode.ACTIVE,
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const primer = new aws_native.lambda.Function("primer", {
        runtime: "nodejs18.x",
        role: "arn:aws:iam::123456789012:role/lambda-role",
        handler: "index.handler",
        code: {
            zipFile: `const { S3Client, ListBucketsCommand } = require("@aws-sdk/client-s3");
    const s3 = new S3Client({ region: "us-east-1" }); // replace "us-east-1" with your AWS region
    
    exports.handler = async function(event) {
      const command = new ListBucketsCommand({});
      const response = await s3.send(command);
      return response.Buckets;
    };
    `,
        },
        description: "List Amazon S3 buckets in us-east-1.",
        tracingConfig: {
            mode: aws_native.lambda.FunctionTracingConfigMode.Active,
        },
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var function = new AwsNative.Lambda.Function("function", new()
        {
            Handler = "index.handler",
            Role = "arn:aws:iam::123456789012:role/lambda-role",
            Code = new AwsNative.Lambda.Inputs.FunctionCodeArgs
            {
                S3Bucket = "my-bucket",
                S3Key = "function.zip",
            },
            Runtime = "nodejs18.x",
            Timeout = 5,
            TracingConfig = new AwsNative.Lambda.Inputs.FunctionTracingConfigArgs
            {
                Mode = AwsNative.Lambda.FunctionTracingConfigMode.Active,
            },
            VpcConfig = new AwsNative.Lambda.Inputs.FunctionVpcConfigArgs
            {
                SecurityGroupIds = new[]
                {
                    "sg-085912345678492fb",
                },
                SubnetIds = new[]
                {
                    "subnet-071f712345678e7c8",
                    "subnet-07fd123456788a036",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/lambda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lambda.NewFunction(ctx, "function", &lambda.FunctionArgs{
    			Handler: pulumi.String("index.handler"),
    			Role:    pulumi.String("arn:aws:iam::123456789012:role/lambda-role"),
    			Code: &lambda.FunctionCodeArgs{
    				S3Bucket: pulumi.String("my-bucket"),
    				S3Key:    pulumi.String("function.zip"),
    			},
    			Runtime: pulumi.String("nodejs18.x"),
    			Timeout: pulumi.Int(5),
    			TracingConfig: &lambda.FunctionTracingConfigArgs{
    				Mode: lambda.FunctionTracingConfigModeActive,
    			},
    			VpcConfig: &lambda.FunctionVpcConfigArgs{
    				SecurityGroupIds: pulumi.StringArray{
    					pulumi.String("sg-085912345678492fb"),
    				},
    				SubnetIds: pulumi.StringArray{
    					pulumi.String("subnet-071f712345678e7c8"),
    					pulumi.String("subnet-07fd123456788a036"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    function = aws_native.lambda_.Function("function",
        handler="index.handler",
        role="arn:aws:iam::123456789012:role/lambda-role",
        code=aws_native.lambda_.FunctionCodeArgs(
            s3_bucket="my-bucket",
            s3_key="function.zip",
        ),
        runtime="nodejs18.x",
        timeout=5,
        tracing_config=aws_native.lambda_.FunctionTracingConfigArgs(
            mode=aws_native.lambda_.FunctionTracingConfigMode.ACTIVE,
        ),
        vpc_config=aws_native.lambda_.FunctionVpcConfigArgs(
            security_group_ids=["sg-085912345678492fb"],
            subnet_ids=[
                "subnet-071f712345678e7c8",
                "subnet-07fd123456788a036",
            ],
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const _function = new aws_native.lambda.Function("function", {
        handler: "index.handler",
        role: "arn:aws:iam::123456789012:role/lambda-role",
        code: {
            s3Bucket: "my-bucket",
            s3Key: "function.zip",
        },
        runtime: "nodejs18.x",
        timeout: 5,
        tracingConfig: {
            mode: aws_native.lambda.FunctionTracingConfigMode.Active,
        },
        vpcConfig: {
            securityGroupIds: ["sg-085912345678492fb"],
            subnetIds: [
                "subnet-071f712345678e7c8",
                "subnet-07fd123456788a036",
            ],
        },
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var function = new AwsNative.Lambda.Function("function", new()
        {
            Handler = "index.handler",
            Role = "arn:aws:iam::123456789012:role/lambda-role",
            Code = new AwsNative.Lambda.Inputs.FunctionCodeArgs
            {
                ZipFile = @"exports.handler = async (event) => {
        console.log(JSON.stringify(event, null, 2));
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello from Lambda!'),
        };
        return response;
    };
    ",
            },
            Runtime = "nodejs18.x",
            TracingConfig = new AwsNative.Lambda.Inputs.FunctionTracingConfigArgs
            {
                Mode = AwsNative.Lambda.FunctionTracingConfigMode.Active,
            },
        });
    
        var version = new AwsNative.Lambda.Version("version", new()
        {
            FunctionName = function.Id,
            Description = "v1",
            ProvisionedConcurrencyConfig = new AwsNative.Lambda.Inputs.VersionProvisionedConcurrencyConfigurationArgs
            {
                ProvisionedConcurrentExecutions = 20,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/lambda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		function, err := lambda.NewFunction(ctx, "function", &lambda.FunctionArgs{
    			Handler: pulumi.String("index.handler"),
    			Role:    pulumi.String("arn:aws:iam::123456789012:role/lambda-role"),
    			Code: &lambda.FunctionCodeArgs{
    				ZipFile: pulumi.String(`exports.handler = async (event) => {
        console.log(JSON.stringify(event, null, 2));
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello from Lambda!'),
        };
        return response;
    };
    `),
    			},
    			Runtime: pulumi.String("nodejs18.x"),
    			TracingConfig: &lambda.FunctionTracingConfigArgs{
    				Mode: lambda.FunctionTracingConfigModeActive,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = lambda.NewVersion(ctx, "version", &lambda.VersionArgs{
    			FunctionName: function.ID(),
    			Description:  pulumi.String("v1"),
    			ProvisionedConcurrencyConfig: &lambda.VersionProvisionedConcurrencyConfigurationArgs{
    				ProvisionedConcurrentExecutions: pulumi.Int(20),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    function = aws_native.lambda_.Function("function",
        handler="index.handler",
        role="arn:aws:iam::123456789012:role/lambda-role",
        code=aws_native.lambda_.FunctionCodeArgs(
            zip_file="""exports.handler = async (event) => {
        console.log(JSON.stringify(event, null, 2));
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello from Lambda!'),
        };
        return response;
    };
    """,
        ),
        runtime="nodejs18.x",
        tracing_config=aws_native.lambda_.FunctionTracingConfigArgs(
            mode=aws_native.lambda_.FunctionTracingConfigMode.ACTIVE,
        ))
    version = aws_native.lambda_.Version("version",
        function_name=function.id,
        description="v1",
        provisioned_concurrency_config=aws_native.lambda_.VersionProvisionedConcurrencyConfigurationArgs(
            provisioned_concurrent_executions=20,
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const _function = new aws_native.lambda.Function("function", {
        handler: "index.handler",
        role: "arn:aws:iam::123456789012:role/lambda-role",
        code: {
            zipFile: `exports.handler = async (event) => {
        console.log(JSON.stringify(event, null, 2));
        const response = {
            statusCode: 200,
            body: JSON.stringify('Hello from Lambda!'),
        };
        return response;
    };
    `,
        },
        runtime: "nodejs18.x",
        tracingConfig: {
            mode: aws_native.lambda.FunctionTracingConfigMode.Active,
        },
    });
    const version = new aws_native.lambda.Version("version", {
        functionName: _function.id,
        description: "v1",
        provisionedConcurrencyConfig: {
            provisionedConcurrentExecutions: 20,
        },
    });
    

    Coming soon!

    Create Function Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Function(name: string, args: FunctionArgs, opts?: CustomResourceOptions);
    @overload
    def Function(resource_name: str,
                 args: FunctionArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Function(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 role: Optional[str] = None,
                 code: Optional[_lambda_.FunctionCodeArgs] = None,
                 layers: Optional[Sequence[str]] = None,
                 vpc_config: Optional[_lambda_.FunctionVpcConfigArgs] = None,
                 architectures: Optional[Sequence[lambda_.FunctionArchitecturesItem]] = None,
                 environment: Optional[_lambda_.FunctionEnvironmentArgs] = None,
                 ephemeral_storage: Optional[_lambda_.FunctionEphemeralStorageArgs] = None,
                 file_system_configs: Optional[Sequence[_lambda_.FunctionFileSystemConfigArgs]] = None,
                 function_name: Optional[str] = None,
                 handler: Optional[str] = None,
                 image_config: Optional[_lambda_.FunctionImageConfigArgs] = None,
                 memory_size: Optional[int] = None,
                 description: Optional[str] = None,
                 dead_letter_config: Optional[_lambda_.FunctionDeadLetterConfigArgs] = None,
                 kms_key_arn: Optional[str] = None,
                 package_type: Optional[lambda_.FunctionPackageType] = None,
                 reserved_concurrent_executions: Optional[int] = None,
                 code_signing_config_arn: Optional[str] = None,
                 runtime: Optional[str] = None,
                 runtime_management_config: Optional[_lambda_.FunctionRuntimeManagementConfigArgs] = None,
                 snap_start: Optional[_lambda_.FunctionSnapStartArgs] = None,
                 tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
                 timeout: Optional[int] = None,
                 tracing_config: Optional[_lambda_.FunctionTracingConfigArgs] = None,
                 logging_config: Optional[_lambda_.FunctionLoggingConfigArgs] = None)
    func NewFunction(ctx *Context, name string, args FunctionArgs, opts ...ResourceOption) (*Function, error)
    public Function(string name, FunctionArgs args, CustomResourceOptions? opts = null)
    public Function(String name, FunctionArgs args)
    public Function(String name, FunctionArgs args, CustomResourceOptions options)
    
    type: aws-native:lambda:Function
    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 FunctionArgs
    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 FunctionArgs
    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 FunctionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FunctionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FunctionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    const aws_nativeFunctionResource = new aws_native.lambda.Function("aws-nativeFunctionResource", {
        role: "string",
        code: {
            imageUri: "string",
            s3Bucket: "string",
            s3Key: "string",
            s3ObjectVersion: "string",
            zipFile: "string",
        },
        layers: ["string"],
        vpcConfig: {
            ipv6AllowedForDualStack: false,
            securityGroupIds: ["string"],
            subnetIds: ["string"],
        },
        architectures: [aws_native.lambda.FunctionArchitecturesItem.X8664],
        environment: {
            variables: {
                string: "string",
            },
        },
        ephemeralStorage: {
            size: 0,
        },
        fileSystemConfigs: [{
            arn: "string",
            localMountPath: "string",
        }],
        functionName: "string",
        handler: "string",
        imageConfig: {
            command: ["string"],
            entryPoint: ["string"],
            workingDirectory: "string",
        },
        memorySize: 0,
        description: "string",
        deadLetterConfig: {
            targetArn: "string",
        },
        kmsKeyArn: "string",
        packageType: aws_native.lambda.FunctionPackageType.Image,
        reservedConcurrentExecutions: 0,
        codeSigningConfigArn: "string",
        runtime: "string",
        runtimeManagementConfig: {
            updateRuntimeOn: aws_native.lambda.FunctionRuntimeManagementConfigUpdateRuntimeOn.Auto,
            runtimeVersionArn: "string",
        },
        snapStart: {
            applyOn: aws_native.lambda.FunctionSnapStartApplyOn.PublishedVersions,
        },
        tags: [{
            key: "string",
            value: "string",
        }],
        timeout: 0,
        tracingConfig: {
            mode: aws_native.lambda.FunctionTracingConfigMode.Active,
        },
        loggingConfig: {
            applicationLogLevel: aws_native.lambda.FunctionLoggingConfigApplicationLogLevel.Trace,
            logFormat: aws_native.lambda.FunctionLoggingConfigLogFormat.Text,
            logGroup: "string",
            systemLogLevel: aws_native.lambda.FunctionLoggingConfigSystemLogLevel.Debug,
        },
    });
    
    Coming soon!
    

    Function 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 Function resource accepts the following input properties:

    Code Pulumi.AwsNative.Lambda.Inputs.FunctionCode
    The code for the function.
    Role string
    The Amazon Resource Name (ARN) of the function's execution role.
    Architectures List<Pulumi.AwsNative.Lambda.FunctionArchitecturesItem>
    The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is x86_64.
    CodeSigningConfigArn string
    To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.
    DeadLetterConfig Pulumi.AwsNative.Lambda.Inputs.FunctionDeadLetterConfig
    A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead-letter queues.
    Description string
    A description of the function.
    Environment Pulumi.AwsNative.Lambda.Inputs.FunctionEnvironment
    Environment variables that are accessible from function code during execution.
    EphemeralStorage Pulumi.AwsNative.Lambda.Inputs.FunctionEphemeralStorage
    The size of the function's /tmp directory in MB. The default value is 512, but it can be any whole number between 512 and 10,240 MB.
    FileSystemConfigs List<Pulumi.AwsNative.Lambda.Inputs.FunctionFileSystemConfig>
    Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function. For more information about using the DependsOn attribute, see DependsOn Attribute.
    FunctionName string
    The name of the Lambda function, up to 64 characters in length. If you don't specify a name, CFN generates one. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
    Handler string
    The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Lambda programming model.
    ImageConfig Pulumi.AwsNative.Lambda.Inputs.FunctionImageConfig
    Configuration values that override the container image Dockerfile settings. For more information, see Container image settings.
    KmsKeyArn string
    The ARN of the KMSlong (KMS) customer managed key that's used to encrypt your function's environment variables. When Lambda SnapStart is activated, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key.
    Layers List<string>
    A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
    LoggingConfig Pulumi.AwsNative.Lambda.Inputs.FunctionLoggingConfig
    The function's Amazon CloudWatch Logs configuration settings.
    MemorySize int
    The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB. Note that new AWS accounts have reduced concurrency and memory quotas. AWS raises these quotas automatically based on your usage. You can also request a quota increase.
    PackageType Pulumi.AwsNative.Lambda.FunctionPackageType
    The type of deployment package. Set to Image for container image and set Zip for .zip file archive.
    ReservedConcurrentExecutions int
    The number of simultaneous executions to reserve for the function.
    Runtime string
    The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. The following list includes deprecated runtimes. For more information, see Runtime deprecation policy.
    RuntimeManagementConfig Pulumi.AwsNative.Lambda.Inputs.FunctionRuntimeManagementConfig
    Sets the runtime management configuration for a function's version. For more information, see Runtime updates.
    SnapStart Pulumi.AwsNative.Lambda.Inputs.FunctionSnapStart
    The function's SnapStart setting.
    Tags List<Pulumi.AwsNative.Inputs.Tag>
    A list of tags to apply to the function.
    Timeout int
    The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see Lambda execution environment.
    TracingConfig Pulumi.AwsNative.Lambda.Inputs.FunctionTracingConfig
    Set Mode to Active to sample and trace a subset of incoming requests with X-Ray.
    VpcConfig Pulumi.AwsNative.Lambda.Inputs.FunctionVpcConfig
    For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see Configuring a Lambda function to access resources in a VPC.
    Code FunctionCodeArgs
    The code for the function.
    Role string
    The Amazon Resource Name (ARN) of the function's execution role.
    Architectures []FunctionArchitecturesItem
    The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is x86_64.
    CodeSigningConfigArn string
    To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.
    DeadLetterConfig FunctionDeadLetterConfigArgs
    A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead-letter queues.
    Description string
    A description of the function.
    Environment FunctionEnvironmentArgs
    Environment variables that are accessible from function code during execution.
    EphemeralStorage FunctionEphemeralStorageArgs
    The size of the function's /tmp directory in MB. The default value is 512, but it can be any whole number between 512 and 10,240 MB.
    FileSystemConfigs []FunctionFileSystemConfigArgs
    Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function. For more information about using the DependsOn attribute, see DependsOn Attribute.
    FunctionName string
    The name of the Lambda function, up to 64 characters in length. If you don't specify a name, CFN generates one. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
    Handler string
    The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Lambda programming model.
    ImageConfig FunctionImageConfigArgs
    Configuration values that override the container image Dockerfile settings. For more information, see Container image settings.
    KmsKeyArn string
    The ARN of the KMSlong (KMS) customer managed key that's used to encrypt your function's environment variables. When Lambda SnapStart is activated, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key.
    Layers []string
    A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
    LoggingConfig FunctionLoggingConfigArgs
    The function's Amazon CloudWatch Logs configuration settings.
    MemorySize int
    The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB. Note that new AWS accounts have reduced concurrency and memory quotas. AWS raises these quotas automatically based on your usage. You can also request a quota increase.
    PackageType FunctionPackageType
    The type of deployment package. Set to Image for container image and set Zip for .zip file archive.
    ReservedConcurrentExecutions int
    The number of simultaneous executions to reserve for the function.
    Runtime string
    The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. The following list includes deprecated runtimes. For more information, see Runtime deprecation policy.
    RuntimeManagementConfig FunctionRuntimeManagementConfigArgs
    Sets the runtime management configuration for a function's version. For more information, see Runtime updates.
    SnapStart FunctionSnapStartArgs
    The function's SnapStart setting.
    Tags TagArgs
    A list of tags to apply to the function.
    Timeout int
    The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see Lambda execution environment.
    TracingConfig FunctionTracingConfigArgs
    Set Mode to Active to sample and trace a subset of incoming requests with X-Ray.
    VpcConfig FunctionVpcConfigArgs
    For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see Configuring a Lambda function to access resources in a VPC.
    code FunctionCode
    The code for the function.
    role String
    The Amazon Resource Name (ARN) of the function's execution role.
    architectures List<FunctionArchitecturesItem>
    The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is x86_64.
    codeSigningConfigArn String
    To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.
    deadLetterConfig FunctionDeadLetterConfig
    A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead-letter queues.
    description String
    A description of the function.
    environment FunctionEnvironment
    Environment variables that are accessible from function code during execution.
    ephemeralStorage FunctionEphemeralStorage
    The size of the function's /tmp directory in MB. The default value is 512, but it can be any whole number between 512 and 10,240 MB.
    fileSystemConfigs List<FunctionFileSystemConfig>
    Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function. For more information about using the DependsOn attribute, see DependsOn Attribute.
    functionName String
    The name of the Lambda function, up to 64 characters in length. If you don't specify a name, CFN generates one. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
    handler String
    The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Lambda programming model.
    imageConfig FunctionImageConfig
    Configuration values that override the container image Dockerfile settings. For more information, see Container image settings.
    kmsKeyArn String
    The ARN of the KMSlong (KMS) customer managed key that's used to encrypt your function's environment variables. When Lambda SnapStart is activated, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key.
    layers List<String>
    A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
    loggingConfig FunctionLoggingConfig
    The function's Amazon CloudWatch Logs configuration settings.
    memorySize Integer
    The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB. Note that new AWS accounts have reduced concurrency and memory quotas. AWS raises these quotas automatically based on your usage. You can also request a quota increase.
    packageType FunctionPackageType
    The type of deployment package. Set to Image for container image and set Zip for .zip file archive.
    reservedConcurrentExecutions Integer
    The number of simultaneous executions to reserve for the function.
    runtime String
    The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. The following list includes deprecated runtimes. For more information, see Runtime deprecation policy.
    runtimeManagementConfig FunctionRuntimeManagementConfig
    Sets the runtime management configuration for a function's version. For more information, see Runtime updates.
    snapStart FunctionSnapStart
    The function's SnapStart setting.
    tags List<Tag>
    A list of tags to apply to the function.
    timeout Integer
    The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see Lambda execution environment.
    tracingConfig FunctionTracingConfig
    Set Mode to Active to sample and trace a subset of incoming requests with X-Ray.
    vpcConfig FunctionVpcConfig
    For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see Configuring a Lambda function to access resources in a VPC.
    code FunctionCode
    The code for the function.
    role string
    The Amazon Resource Name (ARN) of the function's execution role.
    architectures FunctionArchitecturesItem[]
    The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is x86_64.
    codeSigningConfigArn string
    To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.
    deadLetterConfig FunctionDeadLetterConfig
    A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead-letter queues.
    description string
    A description of the function.
    environment FunctionEnvironment
    Environment variables that are accessible from function code during execution.
    ephemeralStorage FunctionEphemeralStorage
    The size of the function's /tmp directory in MB. The default value is 512, but it can be any whole number between 512 and 10,240 MB.
    fileSystemConfigs FunctionFileSystemConfig[]
    Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function. For more information about using the DependsOn attribute, see DependsOn Attribute.
    functionName string
    The name of the Lambda function, up to 64 characters in length. If you don't specify a name, CFN generates one. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
    handler string
    The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Lambda programming model.
    imageConfig FunctionImageConfig
    Configuration values that override the container image Dockerfile settings. For more information, see Container image settings.
    kmsKeyArn string
    The ARN of the KMSlong (KMS) customer managed key that's used to encrypt your function's environment variables. When Lambda SnapStart is activated, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key.
    layers string[]
    A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
    loggingConfig FunctionLoggingConfig
    The function's Amazon CloudWatch Logs configuration settings.
    memorySize number
    The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB. Note that new AWS accounts have reduced concurrency and memory quotas. AWS raises these quotas automatically based on your usage. You can also request a quota increase.
    packageType FunctionPackageType
    The type of deployment package. Set to Image for container image and set Zip for .zip file archive.
    reservedConcurrentExecutions number
    The number of simultaneous executions to reserve for the function.
    runtime string
    The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. The following list includes deprecated runtimes. For more information, see Runtime deprecation policy.
    runtimeManagementConfig FunctionRuntimeManagementConfig
    Sets the runtime management configuration for a function's version. For more information, see Runtime updates.
    snapStart FunctionSnapStart
    The function's SnapStart setting.
    tags Tag[]
    A list of tags to apply to the function.
    timeout number
    The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see Lambda execution environment.
    tracingConfig FunctionTracingConfig
    Set Mode to Active to sample and trace a subset of incoming requests with X-Ray.
    vpcConfig FunctionVpcConfig
    For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see Configuring a Lambda function to access resources in a VPC.
    code lambda_.FunctionCodeArgs
    The code for the function.
    role str
    The Amazon Resource Name (ARN) of the function's execution role.
    architectures Sequence[lambda_.FunctionArchitecturesItem]
    The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is x86_64.
    code_signing_config_arn str
    To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.
    dead_letter_config lambda_.FunctionDeadLetterConfigArgs
    A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead-letter queues.
    description str
    A description of the function.
    environment lambda_.FunctionEnvironmentArgs
    Environment variables that are accessible from function code during execution.
    ephemeral_storage lambda_.FunctionEphemeralStorageArgs
    The size of the function's /tmp directory in MB. The default value is 512, but it can be any whole number between 512 and 10,240 MB.
    file_system_configs Sequence[lambda_.FunctionFileSystemConfigArgs]
    Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function. For more information about using the DependsOn attribute, see DependsOn Attribute.
    function_name str
    The name of the Lambda function, up to 64 characters in length. If you don't specify a name, CFN generates one. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
    handler str
    The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Lambda programming model.
    image_config lambda_.FunctionImageConfigArgs
    Configuration values that override the container image Dockerfile settings. For more information, see Container image settings.
    kms_key_arn str
    The ARN of the KMSlong (KMS) customer managed key that's used to encrypt your function's environment variables. When Lambda SnapStart is activated, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key.
    layers Sequence[str]
    A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
    logging_config lambda_.FunctionLoggingConfigArgs
    The function's Amazon CloudWatch Logs configuration settings.
    memory_size int
    The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB. Note that new AWS accounts have reduced concurrency and memory quotas. AWS raises these quotas automatically based on your usage. You can also request a quota increase.
    package_type lambda_.FunctionPackageType
    The type of deployment package. Set to Image for container image and set Zip for .zip file archive.
    reserved_concurrent_executions int
    The number of simultaneous executions to reserve for the function.
    runtime str
    The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. The following list includes deprecated runtimes. For more information, see Runtime deprecation policy.
    runtime_management_config lambda_.FunctionRuntimeManagementConfigArgs
    Sets the runtime management configuration for a function's version. For more information, see Runtime updates.
    snap_start lambda_.FunctionSnapStartArgs
    The function's SnapStart setting.
    tags Sequence[TagArgs]
    A list of tags to apply to the function.
    timeout int
    The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see Lambda execution environment.
    tracing_config lambda_.FunctionTracingConfigArgs
    Set Mode to Active to sample and trace a subset of incoming requests with X-Ray.
    vpc_config lambda_.FunctionVpcConfigArgs
    For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see Configuring a Lambda function to access resources in a VPC.
    code Property Map
    The code for the function.
    role String
    The Amazon Resource Name (ARN) of the function's execution role.
    architectures List<"x86_64" | "arm64">
    The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is x86_64.
    codeSigningConfigArn String
    To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.
    deadLetterConfig Property Map
    A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead-letter queues.
    description String
    A description of the function.
    environment Property Map
    Environment variables that are accessible from function code during execution.
    ephemeralStorage Property Map
    The size of the function's /tmp directory in MB. The default value is 512, but it can be any whole number between 512 and 10,240 MB.
    fileSystemConfigs List<Property Map>
    Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function. For more information about using the DependsOn attribute, see DependsOn Attribute.
    functionName String
    The name of the Lambda function, up to 64 characters in length. If you don't specify a name, CFN generates one. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
    handler String
    The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Lambda programming model.
    imageConfig Property Map
    Configuration values that override the container image Dockerfile settings. For more information, see Container image settings.
    kmsKeyArn String
    The ARN of the KMSlong (KMS) customer managed key that's used to encrypt your function's environment variables. When Lambda SnapStart is activated, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key.
    layers List<String>
    A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
    loggingConfig Property Map
    The function's Amazon CloudWatch Logs configuration settings.
    memorySize Number
    The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB. Note that new AWS accounts have reduced concurrency and memory quotas. AWS raises these quotas automatically based on your usage. You can also request a quota increase.
    packageType "Image" | "Zip"
    The type of deployment package. Set to Image for container image and set Zip for .zip file archive.
    reservedConcurrentExecutions Number
    The number of simultaneous executions to reserve for the function.
    runtime String
    The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. The following list includes deprecated runtimes. For more information, see Runtime deprecation policy.
    runtimeManagementConfig Property Map
    Sets the runtime management configuration for a function's version. For more information, see Runtime updates.
    snapStart Property Map
    The function's SnapStart setting.
    tags List<Property Map>
    A list of tags to apply to the function.
    timeout Number
    The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see Lambda execution environment.
    tracingConfig Property Map
    Set Mode to Active to sample and trace a subset of incoming requests with X-Ray.
    vpcConfig Property Map
    For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see Configuring a Lambda function to access resources in a VPC.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Function resource produces the following output properties:

    Arn string
    Id string
    The provider-assigned unique ID for this managed resource.
    SnapStartResponse Pulumi.AwsNative.Lambda.Outputs.FunctionSnapStartResponse
    Arn string
    Id string
    The provider-assigned unique ID for this managed resource.
    SnapStartResponse FunctionSnapStartResponse
    arn String
    id String
    The provider-assigned unique ID for this managed resource.
    snapStartResponse FunctionSnapStartResponse
    arn string
    id string
    The provider-assigned unique ID for this managed resource.
    snapStartResponse FunctionSnapStartResponse
    arn str
    id str
    The provider-assigned unique ID for this managed resource.
    snap_start_response lambda_.FunctionSnapStartResponse
    arn String
    id String
    The provider-assigned unique ID for this managed resource.
    snapStartResponse Property Map

    Supporting Types

    FunctionArchitecturesItem, FunctionArchitecturesItemArgs

    X8664
    x86_64
    Arm64
    arm64
    FunctionArchitecturesItemX8664
    x86_64
    FunctionArchitecturesItemArm64
    arm64
    X8664
    x86_64
    Arm64
    arm64
    X8664
    x86_64
    Arm64
    arm64
    X8664
    x86_64
    ARM64
    arm64
    "x86_64"
    x86_64
    "arm64"
    arm64

    FunctionCode, FunctionCodeArgs

    ImageUri string
    URI of a container image in the Amazon ECR registry.
    S3Bucket string
    An Amazon S3 bucket in the same AWS-Region as your function. The bucket can be in a different AWS-account.
    S3Key string
    The Amazon S3 key of the deployment package.
    S3ObjectVersion string
    For versioned objects, the version of the deployment package object to use.
    ZipFile string
    (Node.js and Python) The source code of your Lambda function. If you include your function source inline with this parameter, CFN places it in a file named index and zips it to create a deployment package. This zip file cannot exceed 4MB. For the Handler property, the first part of the handler identifier must be index. For example, index.handler. For JSON, you must escape quotes and special characters such as newline (\n) with a backslash. If you specify a function that interacts with an AWS CloudFormation custom resource, you don't have to write your own functions to send responses to the custom resource that invoked the function. AWS CloudFormation provides a response module (cfn-response) that simplifies sending responses. See Using Lambda with CloudFormation for details.
    ImageUri string
    URI of a container image in the Amazon ECR registry.
    S3Bucket string
    An Amazon S3 bucket in the same AWS-Region as your function. The bucket can be in a different AWS-account.
    S3Key string
    The Amazon S3 key of the deployment package.
    S3ObjectVersion string
    For versioned objects, the version of the deployment package object to use.
    ZipFile string
    (Node.js and Python) The source code of your Lambda function. If you include your function source inline with this parameter, CFN places it in a file named index and zips it to create a deployment package. This zip file cannot exceed 4MB. For the Handler property, the first part of the handler identifier must be index. For example, index.handler. For JSON, you must escape quotes and special characters such as newline (\n) with a backslash. If you specify a function that interacts with an AWS CloudFormation custom resource, you don't have to write your own functions to send responses to the custom resource that invoked the function. AWS CloudFormation provides a response module (cfn-response) that simplifies sending responses. See Using Lambda with CloudFormation for details.
    imageUri String
    URI of a container image in the Amazon ECR registry.
    s3Bucket String
    An Amazon S3 bucket in the same AWS-Region as your function. The bucket can be in a different AWS-account.
    s3Key String
    The Amazon S3 key of the deployment package.
    s3ObjectVersion String
    For versioned objects, the version of the deployment package object to use.
    zipFile String
    (Node.js and Python) The source code of your Lambda function. If you include your function source inline with this parameter, CFN places it in a file named index and zips it to create a deployment package. This zip file cannot exceed 4MB. For the Handler property, the first part of the handler identifier must be index. For example, index.handler. For JSON, you must escape quotes and special characters such as newline (\n) with a backslash. If you specify a function that interacts with an AWS CloudFormation custom resource, you don't have to write your own functions to send responses to the custom resource that invoked the function. AWS CloudFormation provides a response module (cfn-response) that simplifies sending responses. See Using Lambda with CloudFormation for details.
    imageUri string
    URI of a container image in the Amazon ECR registry.
    s3Bucket string
    An Amazon S3 bucket in the same AWS-Region as your function. The bucket can be in a different AWS-account.
    s3Key string
    The Amazon S3 key of the deployment package.
    s3ObjectVersion string
    For versioned objects, the version of the deployment package object to use.
    zipFile string
    (Node.js and Python) The source code of your Lambda function. If you include your function source inline with this parameter, CFN places it in a file named index and zips it to create a deployment package. This zip file cannot exceed 4MB. For the Handler property, the first part of the handler identifier must be index. For example, index.handler. For JSON, you must escape quotes and special characters such as newline (\n) with a backslash. If you specify a function that interacts with an AWS CloudFormation custom resource, you don't have to write your own functions to send responses to the custom resource that invoked the function. AWS CloudFormation provides a response module (cfn-response) that simplifies sending responses. See Using Lambda with CloudFormation for details.
    image_uri str
    URI of a container image in the Amazon ECR registry.
    s3_bucket str
    An Amazon S3 bucket in the same AWS-Region as your function. The bucket can be in a different AWS-account.
    s3_key str
    The Amazon S3 key of the deployment package.
    s3_object_version str
    For versioned objects, the version of the deployment package object to use.
    zip_file str
    (Node.js and Python) The source code of your Lambda function. If you include your function source inline with this parameter, CFN places it in a file named index and zips it to create a deployment package. This zip file cannot exceed 4MB. For the Handler property, the first part of the handler identifier must be index. For example, index.handler. For JSON, you must escape quotes and special characters such as newline (\n) with a backslash. If you specify a function that interacts with an AWS CloudFormation custom resource, you don't have to write your own functions to send responses to the custom resource that invoked the function. AWS CloudFormation provides a response module (cfn-response) that simplifies sending responses. See Using Lambda with CloudFormation for details.
    imageUri String
    URI of a container image in the Amazon ECR registry.
    s3Bucket String
    An Amazon S3 bucket in the same AWS-Region as your function. The bucket can be in a different AWS-account.
    s3Key String
    The Amazon S3 key of the deployment package.
    s3ObjectVersion String
    For versioned objects, the version of the deployment package object to use.
    zipFile String
    (Node.js and Python) The source code of your Lambda function. If you include your function source inline with this parameter, CFN places it in a file named index and zips it to create a deployment package. This zip file cannot exceed 4MB. For the Handler property, the first part of the handler identifier must be index. For example, index.handler. For JSON, you must escape quotes and special characters such as newline (\n) with a backslash. If you specify a function that interacts with an AWS CloudFormation custom resource, you don't have to write your own functions to send responses to the custom resource that invoked the function. AWS CloudFormation provides a response module (cfn-response) that simplifies sending responses. See Using Lambda with CloudFormation for details.

    FunctionDeadLetterConfig, FunctionDeadLetterConfigArgs

    TargetArn string
    The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
    TargetArn string
    The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
    targetArn String
    The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
    targetArn string
    The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
    target_arn str
    The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
    targetArn String
    The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.

    FunctionEnvironment, FunctionEnvironmentArgs

    Variables Dictionary<string, string>
    Environment variable key-value pairs. For more information, see Using Lambda environment variables.
    Variables map[string]string
    Environment variable key-value pairs. For more information, see Using Lambda environment variables.
    variables Map<String,String>
    Environment variable key-value pairs. For more information, see Using Lambda environment variables.
    variables {[key: string]: string}
    Environment variable key-value pairs. For more information, see Using Lambda environment variables.
    variables Mapping[str, str]
    Environment variable key-value pairs. For more information, see Using Lambda environment variables.
    variables Map<String>
    Environment variable key-value pairs. For more information, see Using Lambda environment variables.

    FunctionEphemeralStorage, FunctionEphemeralStorageArgs

    Size int
    The size of the function's /tmp directory.
    Size int
    The size of the function's /tmp directory.
    size Integer
    The size of the function's /tmp directory.
    size number
    The size of the function's /tmp directory.
    size int
    The size of the function's /tmp directory.
    size Number
    The size of the function's /tmp directory.

    FunctionFileSystemConfig, FunctionFileSystemConfigArgs

    Arn string
    The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.
    LocalMountPath string
    The path where the function can access the file system, starting with /mnt/.
    Arn string
    The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.
    LocalMountPath string
    The path where the function can access the file system, starting with /mnt/.
    arn String
    The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.
    localMountPath String
    The path where the function can access the file system, starting with /mnt/.
    arn string
    The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.
    localMountPath string
    The path where the function can access the file system, starting with /mnt/.
    arn str
    The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.
    local_mount_path str
    The path where the function can access the file system, starting with /mnt/.
    arn String
    The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.
    localMountPath String
    The path where the function can access the file system, starting with /mnt/.

    FunctionImageConfig, FunctionImageConfigArgs

    Command List<string>
    Specifies parameters that you want to pass in with ENTRYPOINT. You can specify a maximum of 1,500 parameters in the list.
    EntryPoint List<string>
    Specifies the entry point to their application, which is typically the location of the runtime executable. You can specify a maximum of 1,500 string entries in the list.
    WorkingDirectory string
    Specifies the working directory. The length of the directory string cannot exceed 1,000 characters.
    Command []string
    Specifies parameters that you want to pass in with ENTRYPOINT. You can specify a maximum of 1,500 parameters in the list.
    EntryPoint []string
    Specifies the entry point to their application, which is typically the location of the runtime executable. You can specify a maximum of 1,500 string entries in the list.
    WorkingDirectory string
    Specifies the working directory. The length of the directory string cannot exceed 1,000 characters.
    command List<String>
    Specifies parameters that you want to pass in with ENTRYPOINT. You can specify a maximum of 1,500 parameters in the list.
    entryPoint List<String>
    Specifies the entry point to their application, which is typically the location of the runtime executable. You can specify a maximum of 1,500 string entries in the list.
    workingDirectory String
    Specifies the working directory. The length of the directory string cannot exceed 1,000 characters.
    command string[]
    Specifies parameters that you want to pass in with ENTRYPOINT. You can specify a maximum of 1,500 parameters in the list.
    entryPoint string[]
    Specifies the entry point to their application, which is typically the location of the runtime executable. You can specify a maximum of 1,500 string entries in the list.
    workingDirectory string
    Specifies the working directory. The length of the directory string cannot exceed 1,000 characters.
    command Sequence[str]
    Specifies parameters that you want to pass in with ENTRYPOINT. You can specify a maximum of 1,500 parameters in the list.
    entry_point Sequence[str]
    Specifies the entry point to their application, which is typically the location of the runtime executable. You can specify a maximum of 1,500 string entries in the list.
    working_directory str
    Specifies the working directory. The length of the directory string cannot exceed 1,000 characters.
    command List<String>
    Specifies parameters that you want to pass in with ENTRYPOINT. You can specify a maximum of 1,500 parameters in the list.
    entryPoint List<String>
    Specifies the entry point to their application, which is typically the location of the runtime executable. You can specify a maximum of 1,500 string entries in the list.
    workingDirectory String
    Specifies the working directory. The length of the directory string cannot exceed 1,000 characters.

    FunctionLoggingConfig, FunctionLoggingConfigArgs

    ApplicationLogLevel Pulumi.AwsNative.Lambda.FunctionLoggingConfigApplicationLogLevel
    Set this property to filter the application logs for your function that Lambda sends to CloudWatch. Lambda only sends application logs at the selected level of detail and lower, where TRACE is the highest level and FATAL is the lowest.
    LogFormat Pulumi.AwsNative.Lambda.FunctionLoggingConfigLogFormat
    The format in which Lambda sends your function's application and system logs to CloudWatch. Select between plain text and structured JSON.
    LogGroup string
    The name of the Amazon CloudWatch log group the function sends logs to. By default, Lambda functions send logs to a default log group named /aws/lambda/<function name>. To use a different log group, enter an existing log group or enter a new log group name.
    SystemLogLevel Pulumi.AwsNative.Lambda.FunctionLoggingConfigSystemLogLevel
    Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where DEBUG is the highest level and WARN is the lowest.
    ApplicationLogLevel FunctionLoggingConfigApplicationLogLevel
    Set this property to filter the application logs for your function that Lambda sends to CloudWatch. Lambda only sends application logs at the selected level of detail and lower, where TRACE is the highest level and FATAL is the lowest.
    LogFormat FunctionLoggingConfigLogFormat
    The format in which Lambda sends your function's application and system logs to CloudWatch. Select between plain text and structured JSON.
    LogGroup string
    The name of the Amazon CloudWatch log group the function sends logs to. By default, Lambda functions send logs to a default log group named /aws/lambda/<function name>. To use a different log group, enter an existing log group or enter a new log group name.
    SystemLogLevel FunctionLoggingConfigSystemLogLevel
    Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where DEBUG is the highest level and WARN is the lowest.
    applicationLogLevel FunctionLoggingConfigApplicationLogLevel
    Set this property to filter the application logs for your function that Lambda sends to CloudWatch. Lambda only sends application logs at the selected level of detail and lower, where TRACE is the highest level and FATAL is the lowest.
    logFormat FunctionLoggingConfigLogFormat
    The format in which Lambda sends your function's application and system logs to CloudWatch. Select between plain text and structured JSON.
    logGroup String
    The name of the Amazon CloudWatch log group the function sends logs to. By default, Lambda functions send logs to a default log group named /aws/lambda/<function name>. To use a different log group, enter an existing log group or enter a new log group name.
    systemLogLevel FunctionLoggingConfigSystemLogLevel
    Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where DEBUG is the highest level and WARN is the lowest.
    applicationLogLevel FunctionLoggingConfigApplicationLogLevel
    Set this property to filter the application logs for your function that Lambda sends to CloudWatch. Lambda only sends application logs at the selected level of detail and lower, where TRACE is the highest level and FATAL is the lowest.
    logFormat FunctionLoggingConfigLogFormat
    The format in which Lambda sends your function's application and system logs to CloudWatch. Select between plain text and structured JSON.
    logGroup string
    The name of the Amazon CloudWatch log group the function sends logs to. By default, Lambda functions send logs to a default log group named /aws/lambda/<function name>. To use a different log group, enter an existing log group or enter a new log group name.
    systemLogLevel FunctionLoggingConfigSystemLogLevel
    Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where DEBUG is the highest level and WARN is the lowest.
    application_log_level lambda_.FunctionLoggingConfigApplicationLogLevel
    Set this property to filter the application logs for your function that Lambda sends to CloudWatch. Lambda only sends application logs at the selected level of detail and lower, where TRACE is the highest level and FATAL is the lowest.
    log_format lambda_.FunctionLoggingConfigLogFormat
    The format in which Lambda sends your function's application and system logs to CloudWatch. Select between plain text and structured JSON.
    log_group str
    The name of the Amazon CloudWatch log group the function sends logs to. By default, Lambda functions send logs to a default log group named /aws/lambda/<function name>. To use a different log group, enter an existing log group or enter a new log group name.
    system_log_level lambda_.FunctionLoggingConfigSystemLogLevel
    Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where DEBUG is the highest level and WARN is the lowest.
    applicationLogLevel "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR" | "FATAL"
    Set this property to filter the application logs for your function that Lambda sends to CloudWatch. Lambda only sends application logs at the selected level of detail and lower, where TRACE is the highest level and FATAL is the lowest.
    logFormat "Text" | "JSON"
    The format in which Lambda sends your function's application and system logs to CloudWatch. Select between plain text and structured JSON.
    logGroup String
    The name of the Amazon CloudWatch log group the function sends logs to. By default, Lambda functions send logs to a default log group named /aws/lambda/<function name>. To use a different log group, enter an existing log group or enter a new log group name.
    systemLogLevel "DEBUG" | "INFO" | "WARN"
    Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where DEBUG is the highest level and WARN is the lowest.

    FunctionLoggingConfigApplicationLogLevel, FunctionLoggingConfigApplicationLogLevelArgs

    Trace
    TRACE
    Debug
    DEBUG
    Info
    INFO
    Warn
    WARN
    Error
    ERROR
    Fatal
    FATAL
    FunctionLoggingConfigApplicationLogLevelTrace
    TRACE
    FunctionLoggingConfigApplicationLogLevelDebug
    DEBUG
    FunctionLoggingConfigApplicationLogLevelInfo
    INFO
    FunctionLoggingConfigApplicationLogLevelWarn
    WARN
    FunctionLoggingConfigApplicationLogLevelError
    ERROR
    FunctionLoggingConfigApplicationLogLevelFatal
    FATAL
    Trace
    TRACE
    Debug
    DEBUG
    Info
    INFO
    Warn
    WARN
    Error
    ERROR
    Fatal
    FATAL
    Trace
    TRACE
    Debug
    DEBUG
    Info
    INFO
    Warn
    WARN
    Error
    ERROR
    Fatal
    FATAL
    TRACE
    TRACE
    DEBUG
    DEBUG
    INFO
    INFO
    WARN
    WARN
    ERROR
    ERROR
    FATAL
    FATAL
    "TRACE"
    TRACE
    "DEBUG"
    DEBUG
    "INFO"
    INFO
    "WARN"
    WARN
    "ERROR"
    ERROR
    "FATAL"
    FATAL

    FunctionLoggingConfigLogFormat, FunctionLoggingConfigLogFormatArgs

    Text
    Text
    Json
    JSON
    FunctionLoggingConfigLogFormatText
    Text
    FunctionLoggingConfigLogFormatJson
    JSON
    Text
    Text
    Json
    JSON
    Text
    Text
    Json
    JSON
    TEXT
    Text
    JSON
    JSON
    "Text"
    Text
    "JSON"
    JSON

    FunctionLoggingConfigSystemLogLevel, FunctionLoggingConfigSystemLogLevelArgs

    Debug
    DEBUG
    Info
    INFO
    Warn
    WARN
    FunctionLoggingConfigSystemLogLevelDebug
    DEBUG
    FunctionLoggingConfigSystemLogLevelInfo
    INFO
    FunctionLoggingConfigSystemLogLevelWarn
    WARN
    Debug
    DEBUG
    Info
    INFO
    Warn
    WARN
    Debug
    DEBUG
    Info
    INFO
    Warn
    WARN
    DEBUG
    DEBUG
    INFO
    INFO
    WARN
    WARN
    "DEBUG"
    DEBUG
    "INFO"
    INFO
    "WARN"
    WARN

    FunctionPackageType, FunctionPackageTypeArgs

    Image
    Image
    Zip
    Zip
    FunctionPackageTypeImage
    Image
    FunctionPackageTypeZip
    Zip
    Image
    Image
    Zip
    Zip
    Image
    Image
    Zip
    Zip
    IMAGE
    Image
    ZIP
    Zip
    "Image"
    Image
    "Zip"
    Zip

    FunctionRuntimeManagementConfig, FunctionRuntimeManagementConfigArgs

    UpdateRuntimeOn Pulumi.AwsNative.Lambda.FunctionRuntimeManagementConfigUpdateRuntimeOn

    Specify the runtime update mode.

    • Auto (default) - Automatically update to the most recent and secure runtime version using a Two-phase runtime version rollout. This is the best choice for most customers to ensure they always benefit from runtime updates.
    • FunctionUpdate - LAM updates the runtime of you function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.
    • Manual - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see Roll back a runtime version.

    Valid Values: Auto | FunctionUpdate | Manual

    RuntimeVersionArn string
    The ARN of the runtime version you want the function to use. This is only required if you're using the Manual runtime update mode.
    UpdateRuntimeOn FunctionRuntimeManagementConfigUpdateRuntimeOn

    Specify the runtime update mode.

    • Auto (default) - Automatically update to the most recent and secure runtime version using a Two-phase runtime version rollout. This is the best choice for most customers to ensure they always benefit from runtime updates.
    • FunctionUpdate - LAM updates the runtime of you function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.
    • Manual - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see Roll back a runtime version.

    Valid Values: Auto | FunctionUpdate | Manual

    RuntimeVersionArn string
    The ARN of the runtime version you want the function to use. This is only required if you're using the Manual runtime update mode.
    updateRuntimeOn FunctionRuntimeManagementConfigUpdateRuntimeOn

    Specify the runtime update mode.

    • Auto (default) - Automatically update to the most recent and secure runtime version using a Two-phase runtime version rollout. This is the best choice for most customers to ensure they always benefit from runtime updates.
    • FunctionUpdate - LAM updates the runtime of you function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.
    • Manual - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see Roll back a runtime version.

    Valid Values: Auto | FunctionUpdate | Manual

    runtimeVersionArn String
    The ARN of the runtime version you want the function to use. This is only required if you're using the Manual runtime update mode.
    updateRuntimeOn FunctionRuntimeManagementConfigUpdateRuntimeOn

    Specify the runtime update mode.

    • Auto (default) - Automatically update to the most recent and secure runtime version using a Two-phase runtime version rollout. This is the best choice for most customers to ensure they always benefit from runtime updates.
    • FunctionUpdate - LAM updates the runtime of you function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.
    • Manual - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see Roll back a runtime version.

    Valid Values: Auto | FunctionUpdate | Manual

    runtimeVersionArn string
    The ARN of the runtime version you want the function to use. This is only required if you're using the Manual runtime update mode.
    update_runtime_on lambda_.FunctionRuntimeManagementConfigUpdateRuntimeOn

    Specify the runtime update mode.

    • Auto (default) - Automatically update to the most recent and secure runtime version using a Two-phase runtime version rollout. This is the best choice for most customers to ensure they always benefit from runtime updates.
    • FunctionUpdate - LAM updates the runtime of you function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.
    • Manual - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see Roll back a runtime version.

    Valid Values: Auto | FunctionUpdate | Manual

    runtime_version_arn str
    The ARN of the runtime version you want the function to use. This is only required if you're using the Manual runtime update mode.
    updateRuntimeOn "Auto" | "FunctionUpdate" | "Manual"

    Specify the runtime update mode.

    • Auto (default) - Automatically update to the most recent and secure runtime version using a Two-phase runtime version rollout. This is the best choice for most customers to ensure they always benefit from runtime updates.
    • FunctionUpdate - LAM updates the runtime of you function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.
    • Manual - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see Roll back a runtime version.

    Valid Values: Auto | FunctionUpdate | Manual

    runtimeVersionArn String
    The ARN of the runtime version you want the function to use. This is only required if you're using the Manual runtime update mode.

    FunctionRuntimeManagementConfigUpdateRuntimeOn, FunctionRuntimeManagementConfigUpdateRuntimeOnArgs

    Auto
    Auto
    FunctionUpdate
    FunctionUpdate
    Manual
    Manual
    FunctionRuntimeManagementConfigUpdateRuntimeOnAuto
    Auto
    FunctionRuntimeManagementConfigUpdateRuntimeOnFunctionUpdate
    FunctionUpdate
    FunctionRuntimeManagementConfigUpdateRuntimeOnManual
    Manual
    Auto
    Auto
    FunctionUpdate
    FunctionUpdate
    Manual
    Manual
    Auto
    Auto
    FunctionUpdate
    FunctionUpdate
    Manual
    Manual
    AUTO
    Auto
    FUNCTION_UPDATE
    FunctionUpdate
    MANUAL
    Manual
    "Auto"
    Auto
    "FunctionUpdate"
    FunctionUpdate
    "Manual"
    Manual

    FunctionSnapStart, FunctionSnapStartArgs

    ApplyOn Pulumi.AwsNative.Lambda.FunctionSnapStartApplyOn
    Set ApplyOn to PublishedVersions to create a snapshot of the initialized execution environment when you publish a function version.
    ApplyOn FunctionSnapStartApplyOn
    Set ApplyOn to PublishedVersions to create a snapshot of the initialized execution environment when you publish a function version.
    applyOn FunctionSnapStartApplyOn
    Set ApplyOn to PublishedVersions to create a snapshot of the initialized execution environment when you publish a function version.
    applyOn FunctionSnapStartApplyOn
    Set ApplyOn to PublishedVersions to create a snapshot of the initialized execution environment when you publish a function version.
    apply_on lambda_.FunctionSnapStartApplyOn
    Set ApplyOn to PublishedVersions to create a snapshot of the initialized execution environment when you publish a function version.
    applyOn "PublishedVersions" | "None"
    Set ApplyOn to PublishedVersions to create a snapshot of the initialized execution environment when you publish a function version.

    FunctionSnapStartApplyOn, FunctionSnapStartApplyOnArgs

    PublishedVersions
    PublishedVersions
    None
    None
    FunctionSnapStartApplyOnPublishedVersions
    PublishedVersions
    FunctionSnapStartApplyOnNone
    None
    PublishedVersions
    PublishedVersions
    None
    None
    PublishedVersions
    PublishedVersions
    None
    None
    PUBLISHED_VERSIONS
    PublishedVersions
    NONE
    None
    "PublishedVersions"
    PublishedVersions
    "None"
    None

    FunctionSnapStartResponse, FunctionSnapStartResponseArgs

    ApplyOn Pulumi.AwsNative.Lambda.FunctionSnapStartResponseApplyOn
    When set to PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version.
    OptimizationStatus Pulumi.AwsNative.Lambda.FunctionSnapStartResponseOptimizationStatus
    When you provide a qualified Amazon Resource Name (ARN), this response element indicates whether SnapStart is activated for the specified function version.
    ApplyOn FunctionSnapStartResponseApplyOn
    When set to PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version.
    OptimizationStatus FunctionSnapStartResponseOptimizationStatus
    When you provide a qualified Amazon Resource Name (ARN), this response element indicates whether SnapStart is activated for the specified function version.
    applyOn FunctionSnapStartResponseApplyOn
    When set to PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version.
    optimizationStatus FunctionSnapStartResponseOptimizationStatus
    When you provide a qualified Amazon Resource Name (ARN), this response element indicates whether SnapStart is activated for the specified function version.
    applyOn FunctionSnapStartResponseApplyOn
    When set to PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version.
    optimizationStatus FunctionSnapStartResponseOptimizationStatus
    When you provide a qualified Amazon Resource Name (ARN), this response element indicates whether SnapStart is activated for the specified function version.
    apply_on lambda_.FunctionSnapStartResponseApplyOn
    When set to PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version.
    optimization_status lambda_.FunctionSnapStartResponseOptimizationStatus
    When you provide a qualified Amazon Resource Name (ARN), this response element indicates whether SnapStart is activated for the specified function version.
    applyOn "PublishedVersions" | "None"
    When set to PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version.
    optimizationStatus "On" | "Off"
    When you provide a qualified Amazon Resource Name (ARN), this response element indicates whether SnapStart is activated for the specified function version.

    FunctionSnapStartResponseApplyOn, FunctionSnapStartResponseApplyOnArgs

    PublishedVersions
    PublishedVersions
    None
    None
    FunctionSnapStartResponseApplyOnPublishedVersions
    PublishedVersions
    FunctionSnapStartResponseApplyOnNone
    None
    PublishedVersions
    PublishedVersions
    None
    None
    PublishedVersions
    PublishedVersions
    None
    None
    PUBLISHED_VERSIONS
    PublishedVersions
    NONE
    None
    "PublishedVersions"
    PublishedVersions
    "None"
    None

    FunctionSnapStartResponseOptimizationStatus, FunctionSnapStartResponseOptimizationStatusArgs

    On
    On
    Off
    Off
    FunctionSnapStartResponseOptimizationStatusOn
    On
    FunctionSnapStartResponseOptimizationStatusOff
    Off
    On
    On
    Off
    Off
    On
    On
    Off
    Off
    ON
    On
    OFF
    Off
    "On"
    On
    "Off"
    Off

    FunctionTracingConfig, FunctionTracingConfigArgs

    FunctionTracingConfigMode, FunctionTracingConfigModeArgs

    Active
    Active
    PassThrough
    PassThrough
    FunctionTracingConfigModeActive
    Active
    FunctionTracingConfigModePassThrough
    PassThrough
    Active
    Active
    PassThrough
    PassThrough
    Active
    Active
    PassThrough
    PassThrough
    ACTIVE
    Active
    PASS_THROUGH
    PassThrough
    "Active"
    Active
    "PassThrough"
    PassThrough

    FunctionVpcConfig, FunctionVpcConfigArgs

    Ipv6AllowedForDualStack bool
    Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.
    SecurityGroupIds List<string>
    A list of VPC security group IDs.
    SubnetIds List<string>
    A list of VPC subnet IDs.
    Ipv6AllowedForDualStack bool
    Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.
    SecurityGroupIds []string
    A list of VPC security group IDs.
    SubnetIds []string
    A list of VPC subnet IDs.
    ipv6AllowedForDualStack Boolean
    Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.
    securityGroupIds List<String>
    A list of VPC security group IDs.
    subnetIds List<String>
    A list of VPC subnet IDs.
    ipv6AllowedForDualStack boolean
    Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.
    securityGroupIds string[]
    A list of VPC security group IDs.
    subnetIds string[]
    A list of VPC subnet IDs.
    ipv6_allowed_for_dual_stack bool
    Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.
    security_group_ids Sequence[str]
    A list of VPC security group IDs.
    subnet_ids Sequence[str]
    A list of VPC subnet IDs.
    ipv6AllowedForDualStack Boolean
    Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.
    securityGroupIds List<String>
    A list of VPC security group IDs.
    subnetIds List<String>
    A list of VPC subnet IDs.

    Tag, TagArgs

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.103.0 published on Monday, Apr 22, 2024 by Pulumi