1. Packages
  2. AWS
  3. API Docs
  4. lambda
  5. CallbackFunction
AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi

aws.lambda.CallbackFunction

Explore with Pulumi AI

A CallbackFunction is a special type of aws.lambda.Function that can be created out of an actual JavaScript function instance. The Pulumi compiler and runtime work in tandem to extract your function, package it up along with its dependencies, upload the package to AWS Lambda, and configure the resulting AWS Lambda resources automatically.

The JavaScript function may capture references to other variables in the surrounding code, including other resources and even imported modules. The Pulumi compiler figures out how to serialize the resulting closure as it uploads and configures the AWS Lambda. This works even if you are composing multiple functions together.

See Function Serialization for additional details on this process.

Lambda Function Handler

You can provide the JavaScript function used for the Lambda Function’s Handler either directly by setting the callback input property or instead specify the callbackFactory, which is a Javascript function that will be called to produce the callback function that is the entrypoint for the AWS Lambda. Using callbackFactory is useful when there is expensive initialization work that should only be executed once. The factory-function will be invoked once when the final AWS Lambda module is loaded. It can run whatever code it needs, and will end by returning the actual function that Lambda will call into each time the Lambda is invoked.

It is recommended to use an async function, otherwise the Lambda execution will run until the callback parameter is called and the event loop is empty. See Define Lambda function handler in Node.js for additional details.

Lambda Function Permissions

If neither role nor policies is specified, CallbackFunction will create an IAM role and automatically use the following managed policies:

  • AWSLambda_FullAccess
  • CloudWatchFullAccessV2
  • CloudWatchEventsFullAccess
  • AmazonS3FullAccess
  • AmazonDynamoDBFullAccess
  • AmazonSQSFullAccess
  • AmazonKinesisFullAccess
  • AWSCloudFormationReadOnlyAccess
  • AmazonCognitoPowerUser
  • AWSXrayWriteOnlyAccess

Customizing Lambda function attributes

The Lambdas created by aws.lambda.CallbackFunction use reasonable defaults for CPU, memory, IAM, logging, and other configuration. Should you need to customize these settings, the aws.lambda.CallbackFunction resource offers all of the underlying AWS Lambda settings.

For example, to increase the RAM available to your function to 256MB:

import * as aws from "@pulumi/aws";

// Create an AWS Lambda function with 256MB RAM
const lambda = new aws.lambda.CallbackFunction("docsHandlerFunc", {
    callback: async(event: aws.s3.BucketEvent) => {
        // ...
    },

    memorySize: 256 /* MB */,
});
Copy

Adding/removing files from a function bundle

Occasionally you may need to customize the contents of function bundle before uploading it to AWS Lambda — for example, to remove unneeded Node.js modules or add certain files or folders to the bundle explicitly. The codePathOptions property of CallbackFunction allows you to do this.

In this example, a local directory ./config is added to the function bundle, while an unneeded Node.js module mime is removed:

import * as aws from "@pulumi/aws";
import * as fs from "fs";

const lambda = new aws.lambda.CallbackFunction("docsHandlerFunc", {
    callback: async(event: aws.s3.BucketEvent) => {
        // ...
    },

    codePathOptions: {

        // Add local files or folders to the Lambda function bundle.
        extraIncludePaths: [
            "./config",
        ],

        // Remove unneeded Node.js packages from the bundle.
        extraExcludePackages: [
            "mime",
        ],
    },
});
Copy

Using Lambda layers

Lambda layers allow you to share code, configuration, and other assets across multiple Lambda functions. At runtime, AWS Lambda extracts these files into the function’s filesystem, where you can access their contents as though they belonged to the function bundle itself.

Layers are managed with the aws.lambda.LayerVersion resource, and you can attach them to as many lambda.Function or lambda.CallbackFunction resources as you need using the function’s layers property. Here, the preceding program is updated to package the ./config folder as a Lambda layer instead:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as fs from "fs";

// Create a Lambda layer containing some shared configuration.
const configLayer = new aws.lambda.LayerVersion("config-layer", {
    layerName: "my-config-layer",

    // Use a Pulumi AssetArchive to zip up the contents of the folder.
    code: new pulumi.asset.AssetArchive({
        "config": new pulumi.asset.FileArchive("./config"),
    }),
});

const lambda = new aws.lambda.CallbackFunction("docsHandlerFunc", {
    callback: async(event: aws.s3.BucketEvent) => {
        // ...
    },

    // Attach the config layer to the function.
    layers: [
        configLayer.arn,
    ],
});
Copy

Notice the path to the file is now /opt/config/config.json/opt being the path at which AWS Lambda extracts the contents of a layer. The configuration layer is now manageable and deployable independently of the Lambda itself, allowing changes to be applied immediately across all functions that use it.

Using layers for Node.js dependencies

This same approach can be used for sharing Node.js module dependencies. When you package your dependencies at the proper path within the layer zip file, (e.g., nodejs/node_modules), AWS Lambda will unpack and expose them automatically to the functions that use them at runtime. This approach can be useful in monorepo scenarios such as the example below, which adds a locally built Node.js module as a layer, then references references the module from within the body of a CallbackFunction:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

// Create a layer containing a locally built Node.js module.
const utilsLayer = new aws.lambda.LayerVersion("utils-layer", {
    layerName: "utils",
    code: new pulumi.asset.AssetArchive({

        // Store the module under nodejs/node_modules to make it available
        // on the Node.js module path.
        "nodejs/node_modules/@my-alias/utils": new pulumi.asset.FileArchive("./layers/utils/dist"),
    }),
});

const lambda =  new aws.lambda.CallbackFunction("docsHandlerFunc", {
    callback: async (event: aws.s3.BucketEvent) => {

        // Import the module from the layer at runtime.
        const { sayHello } = await import("@my-alias/utils");

        // Call a function from the utils module.
        console.log(sayHello());
    },

    // Attach the utils layer to the function.
    layers: [
        utilsLayer.arn,
    ],
});
Copy

Notice the example uses the module name @my-alias/utils. To make this work, you’ll need to add a few lines to your Pulumi project’s tsconfig.json file to map your chosen module name to the path of the module’s TypeScript source code:

{
    "compilerOptions": {
        // ...
        "baseUrl": ".",
        "paths": {
            "@my-alias/utils": [
                "./layers/utils"
            ]
        }
    },
    // ...
}
Copy

Example Usage

Basic Lambda Function

Coming soon!

Coming soon!

Coming soon!

import * as aws from "@pulumi/aws";

// Create an AWS Lambda function that fetches the Pulumi website and returns the HTTP status
const lambda = new aws.lambda.CallbackFunction("fetcher", {
    callback: async(event) => {
        try {
            const res = await fetch("https://www.pulumi.com/robots.txt");
            console.info("status", res.status);
            return res.status;
        }
        catch (e) {
            console.error(e);
            return 500;
        }
    },
});
Copy

Coming soon!

Coming soon!

Lambda Function with expensive initialization work

Coming soon!

Coming soon!

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as express from "express";
import * as serverlessExpress from "aws-serverless-express";
import * as middleware from "aws-serverless-express/middleware";

const lambda = new aws.lambda.CallbackFunction<any, any>("mylambda", {
  callbackFactory: () => {
    const app = express();
    app.use(middleware.eventContext());
    let ctx;

    app.get("/", (req, res) => {
      console.log("Invoked url: " + req.url);

      fetch('https://www.pulumi.com/robots.txt').then(resp => {
        res.json({
          message: "Hello, world!\n\nSucceeded with " + ctx.getRemainingTimeInMillis() + "ms remaining.",
          fetchStatus: resp.status,
          fetched: resp.text(),
        });
      });
    });

    const server = serverlessExpress.createServer(app);
    return (event, context) => {
      console.log("Lambda invoked");
      console.log("Invoked function: " + context.invokedFunctionArn);
      console.log("Proxying to express");
      ctx = context;
      serverlessExpress.proxy(server, event, <any>context);
    }
  }
});
Copy

Coming soon!

Coming soon!

API Gateway Handler Function

Coming soon!

Coming soon!

Coming soon!

import * as apigateway from "@pulumi/aws-apigateway";
import { APIGatewayProxyEvent, Context } from "aws-lambda";

const api = new apigateway.RestAPI("api", {
    routes: [
        {
            path: "/api",
            eventHandler: async (event: APIGatewayProxyEvent, context: Context) => {
                return {
                    statusCode: 200,
                    body: JSON.stringify({
                        eventPath: event.path,
                        functionName: context.functionName,
                    })
                };
            },
        },
    ],
});

export const url = api.url;
Copy

Coming soon!

Coming soon!

Create CallbackFunction Resource

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

Constructor syntax

new CallbackFunction(name: string, args?: CallbackFunctionArgs, opts?: CustomResourceOptions);
@overload
def CallbackFunction(resource_name: str,
                     args: Optional[CallbackFunctionArgs] = None,
                     opts: Optional[ResourceOptions] = None)

@overload
def CallbackFunction(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     architectures: Optional[Sequence[str]] = None,
                     callback: Optional[Any] = None,
                     callback_factory: Optional[Any] = None,
                     code_path_options: Optional[_lambda_.CodePathOptionsArgs] = None,
                     code_signing_config_arn: Optional[str] = None,
                     dead_letter_config: Optional[_lambda_.FunctionDeadLetterConfigArgs] = None,
                     description: Optional[str] = None,
                     environment: Optional[_lambda_.FunctionEnvironmentArgs] = None,
                     ephemeral_storage: Optional[_lambda_.FunctionEphemeralStorageArgs] = None,
                     file_system_config: Optional[_lambda_.FunctionFileSystemConfigArgs] = None,
                     image_config: Optional[_lambda_.FunctionImageConfigArgs] = None,
                     image_uri: Optional[str] = None,
                     kms_key_arn: Optional[str] = None,
                     layers: Optional[Sequence[str]] = None,
                     logging_config: Optional[_lambda_.FunctionLoggingConfigArgs] = None,
                     memory_size: Optional[int] = None,
                     name: Optional[str] = None,
                     package_type: Optional[str] = None,
                     policies: Optional[Union[Mapping[str, str], Sequence[str]]] = None,
                     publish: Optional[bool] = None,
                     replace_security_groups_on_destroy: Optional[bool] = None,
                     replacement_security_group_ids: Optional[Sequence[str]] = None,
                     reserved_concurrent_executions: Optional[int] = None,
                     role: Optional[Union[Any, str]] = None,
                     runtime: Optional[lambda_.Runtime] = None,
                     s3_bucket: Optional[str] = None,
                     s3_key: Optional[str] = None,
                     s3_object_version: Optional[str] = None,
                     skip_destroy: Optional[bool] = None,
                     snap_start: Optional[_lambda_.FunctionSnapStartArgs] = None,
                     source_code_hash: Optional[str] = None,
                     tags: Optional[Mapping[str, str]] = None,
                     timeout: Optional[int] = None,
                     tracing_config: Optional[_lambda_.FunctionTracingConfigArgs] = None,
                     vpc_config: Optional[_lambda_.FunctionVpcConfigArgs] = None)
func NewCallbackFunction(ctx *Context, name string, args *CallbackFunctionArgs, opts ...ResourceOption) (*CallbackFunction, error)
public CallbackFunction(string name, CallbackFunctionArgs? args = null, CustomResourceOptions? opts = null)
public CallbackFunction(String name, CallbackFunctionArgs args)
public CallbackFunction(String name, CallbackFunctionArgs args, CustomResourceOptions options)
type: aws:lambda:CallbackFunction
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args CallbackFunctionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args CallbackFunctionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args CallbackFunctionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args CallbackFunctionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CallbackFunctionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

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

var callbackFunctionResource = new Aws.Lambda.CallbackFunction("callbackFunctionResource", new()
{
    Architectures = new[]
    {
        "string",
    },
    Callback = "any",
    CallbackFactory = "any",
    CodePathOptions = new Aws.Lambda.Inputs.CodePathOptionsArgs
    {
        ExtraExcludePackages = new[]
        {
            "string",
        },
        ExtraIncludePackages = new[]
        {
            "string",
        },
        ExtraIncludePaths = new[]
        {
            "string",
        },
    },
    CodeSigningConfigArn = "string",
    DeadLetterConfig = new Aws.Lambda.Inputs.FunctionDeadLetterConfigArgs
    {
        TargetArn = "string",
    },
    Description = "string",
    Environment = new Aws.Lambda.Inputs.FunctionEnvironmentArgs
    {
        Variables = 
        {
            { "string", "string" },
        },
    },
    EphemeralStorage = new Aws.Lambda.Inputs.FunctionEphemeralStorageArgs
    {
        Size = 0,
    },
    FileSystemConfig = new Aws.Lambda.Inputs.FunctionFileSystemConfigArgs
    {
        Arn = "string",
        LocalMountPath = "string",
    },
    ImageConfig = new Aws.Lambda.Inputs.FunctionImageConfigArgs
    {
        Commands = new[]
        {
            "string",
        },
        EntryPoints = new[]
        {
            "string",
        },
        WorkingDirectory = "string",
    },
    ImageUri = "string",
    KmsKeyArn = "string",
    Layers = new[]
    {
        "string",
    },
    LoggingConfig = new Aws.Lambda.Inputs.FunctionLoggingConfigArgs
    {
        LogFormat = "string",
        ApplicationLogLevel = "string",
        LogGroup = "string",
        SystemLogLevel = "string",
    },
    MemorySize = 0,
    Name = "string",
    PackageType = "string",
    Policies = null,
    Publish = false,
    ReplaceSecurityGroupsOnDestroy = false,
    ReplacementSecurityGroupIds = new[]
    {
        "string",
    },
    ReservedConcurrentExecutions = 0,
    Role = null,
    Runtime = Aws.Lambda.Runtime.Dotnet6,
    S3Bucket = "string",
    S3Key = "string",
    S3ObjectVersion = "string",
    SkipDestroy = false,
    SnapStart = new Aws.Lambda.Inputs.FunctionSnapStartArgs
    {
        ApplyOn = "string",
        OptimizationStatus = "string",
    },
    SourceCodeHash = "string",
    Tags = 
    {
        { "string", "string" },
    },
    Timeout = 0,
    TracingConfig = new Aws.Lambda.Inputs.FunctionTracingConfigArgs
    {
        Mode = "string",
    },
    VpcConfig = new Aws.Lambda.Inputs.FunctionVpcConfigArgs
    {
        SecurityGroupIds = new[]
        {
            "string",
        },
        SubnetIds = new[]
        {
            "string",
        },
        Ipv6AllowedForDualStack = false,
        VpcId = "string",
    },
});
Copy
example, err := lambda.NewCallbackFunction(ctx, "callbackFunctionResource", &lambda.CallbackFunctionArgs{
	Architectures: pulumi.StringArray{
		pulumi.String("string"),
	},
	Callback:        pulumi.Any("any"),
	CallbackFactory: pulumi.Any("any"),
	CodePathOptions: &lambda.CodePathOptionsArgs{
		ExtraExcludePackages: pulumi.StringArray{
			pulumi.String("string"),
		},
		ExtraIncludePackages: pulumi.StringArray{
			pulumi.String("string"),
		},
		ExtraIncludePaths: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	CodeSigningConfigArn: pulumi.String("string"),
	DeadLetterConfig: &lambda.FunctionDeadLetterConfigArgs{
		TargetArn: pulumi.String("string"),
	},
	Description: pulumi.String("string"),
	Environment: &lambda.FunctionEnvironmentArgs{
		Variables: pulumi.StringMap{
			"string": pulumi.String("string"),
		},
	},
	EphemeralStorage: &lambda.FunctionEphemeralStorageArgs{
		Size: pulumi.Int(0),
	},
	FileSystemConfig: &lambda.FunctionFileSystemConfigArgs{
		Arn:            pulumi.String("string"),
		LocalMountPath: pulumi.String("string"),
	},
	ImageConfig: &lambda.FunctionImageConfigArgs{
		Commands: pulumi.StringArray{
			pulumi.String("string"),
		},
		EntryPoints: pulumi.StringArray{
			pulumi.String("string"),
		},
		WorkingDirectory: pulumi.String("string"),
	},
	ImageUri:  pulumi.String("string"),
	KmsKeyArn: pulumi.String("string"),
	Layers: pulumi.StringArray{
		pulumi.String("string"),
	},
	LoggingConfig: &lambda.FunctionLoggingConfigArgs{
		LogFormat:           pulumi.String("string"),
		ApplicationLogLevel: pulumi.String("string"),
		LogGroup:            pulumi.String("string"),
		SystemLogLevel:      pulumi.String("string"),
	},
	MemorySize:                     pulumi.Int(0),
	Name:                           pulumi.String("string"),
	PackageType:                    pulumi.String("string"),
	Policies:                       nil,
	Publish:                        pulumi.Bool(false),
	ReplaceSecurityGroupsOnDestroy: pulumi.Bool(false),
	ReplacementSecurityGroupIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	ReservedConcurrentExecutions: pulumi.Int(0),
	Role:                         nil,
	Runtime:                      lambda.RuntimeDotnet6,
	S3Bucket:                     pulumi.String("string"),
	S3Key:                        pulumi.String("string"),
	S3ObjectVersion:              pulumi.String("string"),
	SkipDestroy:                  pulumi.Bool(false),
	SnapStart: &lambda.FunctionSnapStartArgs{
		ApplyOn:            pulumi.String("string"),
		OptimizationStatus: pulumi.String("string"),
	},
	SourceCodeHash: pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Timeout: pulumi.Int(0),
	TracingConfig: &lambda.FunctionTracingConfigArgs{
		Mode: pulumi.String("string"),
	},
	VpcConfig: &lambda.FunctionVpcConfigArgs{
		SecurityGroupIds: pulumi.StringArray{
			pulumi.String("string"),
		},
		SubnetIds: pulumi.StringArray{
			pulumi.String("string"),
		},
		Ipv6AllowedForDualStack: pulumi.Bool(false),
		VpcId:                   pulumi.String("string"),
	},
})
Copy
var callbackFunctionResource = new CallbackFunction("callbackFunctionResource", CallbackFunctionArgs.builder()
    .architectures("string")
    .callback("any")
    .callbackFactory("any")
    .codePathOptions(CodePathOptionsArgs.builder()
        .extraExcludePackages("string")
        .extraIncludePackages("string")
        .extraIncludePaths("string")
        .build())
    .codeSigningConfigArn("string")
    .deadLetterConfig(FunctionDeadLetterConfigArgs.builder()
        .targetArn("string")
        .build())
    .description("string")
    .environment(FunctionEnvironmentArgs.builder()
        .variables(Map.of("string", "string"))
        .build())
    .ephemeralStorage(FunctionEphemeralStorageArgs.builder()
        .size(0)
        .build())
    .fileSystemConfig(FunctionFileSystemConfigArgs.builder()
        .arn("string")
        .localMountPath("string")
        .build())
    .imageConfig(FunctionImageConfigArgs.builder()
        .commands("string")
        .entryPoints("string")
        .workingDirectory("string")
        .build())
    .imageUri("string")
    .kmsKeyArn("string")
    .layers("string")
    .loggingConfig(FunctionLoggingConfigArgs.builder()
        .logFormat("string")
        .applicationLogLevel("string")
        .logGroup("string")
        .systemLogLevel("string")
        .build())
    .memorySize(0)
    .name("string")
    .packageType("string")
    .policies(null)
    .publish(false)
    .replaceSecurityGroupsOnDestroy(false)
    .replacementSecurityGroupIds("string")
    .reservedConcurrentExecutions(0)
    .role(null)
    .runtime("dotnet6")
    .s3Bucket("string")
    .s3Key("string")
    .s3ObjectVersion("string")
    .skipDestroy(false)
    .snapStart(FunctionSnapStartArgs.builder()
        .applyOn("string")
        .optimizationStatus("string")
        .build())
    .sourceCodeHash("string")
    .tags(Map.of("string", "string"))
    .timeout(0)
    .tracingConfig(FunctionTracingConfigArgs.builder()
        .mode("string")
        .build())
    .vpcConfig(FunctionVpcConfigArgs.builder()
        .securityGroupIds("string")
        .subnetIds("string")
        .ipv6AllowedForDualStack(false)
        .vpcId("string")
        .build())
    .build());
Copy
callback_function_resource = aws.lambda_.CallbackFunction("callbackFunctionResource",
    architectures=["string"],
    callback="any",
    callback_factory="any",
    code_path_options={
        "extra_exclude_packages": ["string"],
        "extra_include_packages": ["string"],
        "extra_include_paths": ["string"],
    },
    code_signing_config_arn="string",
    dead_letter_config={
        "target_arn": "string",
    },
    description="string",
    environment={
        "variables": {
            "string": "string",
        },
    },
    ephemeral_storage={
        "size": 0,
    },
    file_system_config={
        "arn": "string",
        "local_mount_path": "string",
    },
    image_config={
        "commands": ["string"],
        "entry_points": ["string"],
        "working_directory": "string",
    },
    image_uri="string",
    kms_key_arn="string",
    layers=["string"],
    logging_config={
        "log_format": "string",
        "application_log_level": "string",
        "log_group": "string",
        "system_log_level": "string",
    },
    memory_size=0,
    name="string",
    package_type="string",
    policies=None,
    publish=False,
    replace_security_groups_on_destroy=False,
    replacement_security_group_ids=["string"],
    reserved_concurrent_executions=0,
    role=None,
    runtime=aws.lambda_.Runtime.DOTNET6,
    s3_bucket="string",
    s3_key="string",
    s3_object_version="string",
    skip_destroy=False,
    snap_start={
        "apply_on": "string",
        "optimization_status": "string",
    },
    source_code_hash="string",
    tags={
        "string": "string",
    },
    timeout=0,
    tracing_config={
        "mode": "string",
    },
    vpc_config={
        "security_group_ids": ["string"],
        "subnet_ids": ["string"],
        "ipv6_allowed_for_dual_stack": False,
        "vpc_id": "string",
    })
Copy
const callbackFunctionResource = new aws.lambda.CallbackFunction("callbackFunctionResource", {
    architectures: ["string"],
    callback: "any",
    callbackFactory: "any",
    codePathOptions: {
        extraExcludePackages: ["string"],
        extraIncludePackages: ["string"],
        extraIncludePaths: ["string"],
    },
    codeSigningConfigArn: "string",
    deadLetterConfig: {
        targetArn: "string",
    },
    description: "string",
    environment: {
        variables: {
            string: "string",
        },
    },
    ephemeralStorage: {
        size: 0,
    },
    fileSystemConfig: {
        arn: "string",
        localMountPath: "string",
    },
    imageConfig: {
        commands: ["string"],
        entryPoints: ["string"],
        workingDirectory: "string",
    },
    imageUri: "string",
    kmsKeyArn: "string",
    layers: ["string"],
    loggingConfig: {
        logFormat: "string",
        applicationLogLevel: "string",
        logGroup: "string",
        systemLogLevel: "string",
    },
    memorySize: 0,
    name: "string",
    packageType: "string",
    policies: undefined,
    publish: false,
    replaceSecurityGroupsOnDestroy: false,
    replacementSecurityGroupIds: ["string"],
    reservedConcurrentExecutions: 0,
    role: undefined,
    runtime: aws.lambda.Runtime.Dotnet6,
    s3Bucket: "string",
    s3Key: "string",
    s3ObjectVersion: "string",
    skipDestroy: false,
    snapStart: {
        applyOn: "string",
        optimizationStatus: "string",
    },
    sourceCodeHash: "string",
    tags: {
        string: "string",
    },
    timeout: 0,
    tracingConfig: {
        mode: "string",
    },
    vpcConfig: {
        securityGroupIds: ["string"],
        subnetIds: ["string"],
        ipv6AllowedForDualStack: false,
        vpcId: "string",
    },
});
Copy
type: aws:lambda:CallbackFunction
properties:
    architectures:
        - string
    callback: any
    callbackFactory: any
    codePathOptions:
        extraExcludePackages:
            - string
        extraIncludePackages:
            - string
        extraIncludePaths:
            - string
    codeSigningConfigArn: string
    deadLetterConfig:
        targetArn: string
    description: string
    environment:
        variables:
            string: string
    ephemeralStorage:
        size: 0
    fileSystemConfig:
        arn: string
        localMountPath: string
    imageConfig:
        commands:
            - string
        entryPoints:
            - string
        workingDirectory: string
    imageUri: string
    kmsKeyArn: string
    layers:
        - string
    loggingConfig:
        applicationLogLevel: string
        logFormat: string
        logGroup: string
        systemLogLevel: string
    memorySize: 0
    name: string
    packageType: string
    policies: null
    publish: false
    replaceSecurityGroupsOnDestroy: false
    replacementSecurityGroupIds:
        - string
    reservedConcurrentExecutions: 0
    role: null
    runtime: dotnet6
    s3Bucket: string
    s3Key: string
    s3ObjectVersion: string
    skipDestroy: false
    snapStart:
        applyOn: string
        optimizationStatus: string
    sourceCodeHash: string
    tags:
        string: string
    timeout: 0
    tracingConfig:
        mode: string
    vpcConfig:
        ipv6AllowedForDualStack: false
        securityGroupIds:
            - string
        subnetIds:
            - string
        vpcId: string
Copy

CallbackFunction Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The CallbackFunction resource accepts the following input properties:

Architectures List<string>
Instruction set architecture for your Lambda function. Valid values are ["x86_64"] and ["arm64"]. Default is ["x86_64"]. Removing this attribute, function's architecture stay the same.
Callback object
The Javascript function to use as the entrypoint for the AWS Lambda out of. Either callback or callbackFactory must be provided.
CallbackFactory object
The Javascript function that will be called to produce the callback function that is the entrypoint for the AWS Lambda. Either callback or callbackFactory must be provided.
CodePathOptions CodePathOptions
Options to control which paths/packages should be included or excluded in the zip file containing the code for the AWS lambda.
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
Configuration block. Detailed below.
Description string
Description of what your Lambda Function does.
Environment FunctionEnvironment
Configuration block. Detailed below.
EphemeralStorage FunctionEphemeralStorage
The amount of Ephemeral storage(/tmp) to allocate for the Lambda Function in MB. This parameter is used to expand the total amount of Ephemeral storage available, beyond the default amount of 512MB. Detailed below.
FileSystemConfig FunctionFileSystemConfig
Configuration block. Detailed below.
ImageConfig FunctionImageConfig
Configuration block. Detailed below.
ImageUri string
ECR image URI containing the function's deployment package. Exactly one of filename, image_uri, or s3_bucket must be specified.
KmsKeyArn string
Amazon Resource Name (ARN) of the AWS Key Management Service (KMS) key that is used to encrypt environment variables. If this configuration is not provided when environment variables are in use, AWS Lambda uses a default service key. If this configuration is provided when environment variables are not in use, the AWS Lambda API does not save this configuration and the provider will show a perpetual difference of adding the key. To fix the perpetual difference, remove this configuration.
Layers List<string>
List of Lambda Layer Version ARNs (maximum of 5) to attach to your Lambda Function. See Lambda Layers
LoggingConfig FunctionLoggingConfig
Configuration block used to specify advanced logging settings. Detailed below.
MemorySize int
Amount of memory in MB your Lambda Function can use at runtime. Defaults to 128. See Limits
Name Changes to this property will trigger replacement. string
Unique name for your Lambda Function.
PackageType Changes to this property will trigger replacement. string
Lambda deployment package type. Valid values are Zip and Image. Defaults to Zip.
Policies Dictionary<string, string> | List<string>
A list of IAM policy ARNs to attach to the Function. Only one of role or policies can be provided. If neither is provided, the default policies will be used instead.
Publish bool
Whether to publish creation/change as new Lambda Function Version. Defaults to false.
ReplaceSecurityGroupsOnDestroy bool
Whether to replace the security groups on the function's VPC configuration prior to destruction. Removing these security group associations prior to function destruction can speed up security group deletion times of AWS's internal cleanup operations. By default, the security groups will be replaced with the default security group in the function's configured VPC. Set the replacement_security_group_ids attribute to use a custom list of security groups for replacement.
ReplacementSecurityGroupIds List<string>
List of security group IDs to assign to the function's VPC configuration prior to destruction. replace_security_groups_on_destroy must be set to true to use this attribute.
ReservedConcurrentExecutions int
Amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. Defaults to Unreserved Concurrency Limits -1. See Managing Concurrency
Role Pulumi.Aws.Iam.Inputs.Role | string
The execution role for the Lambda Function. The role provides the function's identity and access to AWS services and resources. Only one of role or policies can be provided. If neither is provided, the default policies will be used instead.
Runtime Pulumi.Aws.Lambda.Runtime
The Lambda runtime to use. If not provided, will default to NodeJS20dX.
S3Bucket string
S3 bucket location containing the function's deployment package. This bucket must reside in the same AWS region where you are creating the Lambda function. Exactly one of filename, image_uri, or s3_bucket must be specified. When s3_bucket is set, s3_key is required.
S3Key string
S3 key of an object containing the function's deployment package. When s3_bucket is set, s3_key is required.
S3ObjectVersion string
Object version containing the function's deployment package. Conflicts with filename and image_uri.
SkipDestroy bool
Set to true if you do not wish the function to be deleted at destroy time, and instead just remove the function from the Pulumi state.
SnapStart FunctionSnapStart
Snap start settings block. Detailed below.
SourceCodeHash string
Virtual attribute used to trigger replacement when source code changes. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.
Tags Dictionary<string, string>
Map of tags to assign to the object. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Timeout int
Amount of time your Lambda Function has to run in seconds. Defaults to 3. See Limits.
TracingConfig FunctionTracingConfig
Configuration block. Detailed below.
VpcConfig FunctionVpcConfig
Configuration block. Detailed below.
Architectures []string
Instruction set architecture for your Lambda function. Valid values are ["x86_64"] and ["arm64"]. Default is ["x86_64"]. Removing this attribute, function's architecture stay the same.
Callback interface{}
The Javascript function to use as the entrypoint for the AWS Lambda out of. Either callback or callbackFactory must be provided.
CallbackFactory interface{}
The Javascript function that will be called to produce the callback function that is the entrypoint for the AWS Lambda. Either callback or callbackFactory must be provided.
CodePathOptions CodePathOptionsArgs
Options to control which paths/packages should be included or excluded in the zip file containing the code for the AWS lambda.
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
Configuration block. Detailed below.
Description string
Description of what your Lambda Function does.
Environment FunctionEnvironmentArgs
Configuration block. Detailed below.
EphemeralStorage FunctionEphemeralStorageArgs
The amount of Ephemeral storage(/tmp) to allocate for the Lambda Function in MB. This parameter is used to expand the total amount of Ephemeral storage available, beyond the default amount of 512MB. Detailed below.
FileSystemConfig FunctionFileSystemConfigArgs
Configuration block. Detailed below.
ImageConfig FunctionImageConfigArgs
Configuration block. Detailed below.
ImageUri string
ECR image URI containing the function's deployment package. Exactly one of filename, image_uri, or s3_bucket must be specified.
KmsKeyArn string
Amazon Resource Name (ARN) of the AWS Key Management Service (KMS) key that is used to encrypt environment variables. If this configuration is not provided when environment variables are in use, AWS Lambda uses a default service key. If this configuration is provided when environment variables are not in use, the AWS Lambda API does not save this configuration and the provider will show a perpetual difference of adding the key. To fix the perpetual difference, remove this configuration.
Layers []string
List of Lambda Layer Version ARNs (maximum of 5) to attach to your Lambda Function. See Lambda Layers
LoggingConfig FunctionLoggingConfigArgs
Configuration block used to specify advanced logging settings. Detailed below.
MemorySize int
Amount of memory in MB your Lambda Function can use at runtime. Defaults to 128. See Limits
Name Changes to this property will trigger replacement. string
Unique name for your Lambda Function.
PackageType Changes to this property will trigger replacement. string
Lambda deployment package type. Valid values are Zip and Image. Defaults to Zip.
Policies map[string]string | []string
A list of IAM policy ARNs to attach to the Function. Only one of role or policies can be provided. If neither is provided, the default policies will be used instead.
Publish bool
Whether to publish creation/change as new Lambda Function Version. Defaults to false.
ReplaceSecurityGroupsOnDestroy bool
Whether to replace the security groups on the function's VPC configuration prior to destruction. Removing these security group associations prior to function destruction can speed up security group deletion times of AWS's internal cleanup operations. By default, the security groups will be replaced with the default security group in the function's configured VPC. Set the replacement_security_group_ids attribute to use a custom list of security groups for replacement.
ReplacementSecurityGroupIds []string
List of security group IDs to assign to the function's VPC configuration prior to destruction. replace_security_groups_on_destroy must be set to true to use this attribute.
ReservedConcurrentExecutions int
Amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. Defaults to Unreserved Concurrency Limits -1. See Managing Concurrency
Role Role | string
The execution role for the Lambda Function. The role provides the function's identity and access to AWS services and resources. Only one of role or policies can be provided. If neither is provided, the default policies will be used instead.
Runtime Runtime
The Lambda runtime to use. If not provided, will default to NodeJS20dX.
S3Bucket string
S3 bucket location containing the function's deployment package. This bucket must reside in the same AWS region where you are creating the Lambda function. Exactly one of filename, image_uri, or s3_bucket must be specified. When s3_bucket is set, s3_key is required.
S3Key string
S3 key of an object containing the function's deployment package. When s3_bucket is set, s3_key is required.
S3ObjectVersion string
Object version containing the function's deployment package. Conflicts with filename and image_uri.
SkipDestroy bool
Set to true if you do not wish the function to be deleted at destroy time, and instead just remove the function from the Pulumi state.
SnapStart FunctionSnapStartArgs
Snap start settings block. Detailed below.
SourceCodeHash string
Virtual attribute used to trigger replacement when source code changes. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.
Tags map[string]string
Map of tags to assign to the object. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Timeout int
Amount of time your Lambda Function has to run in seconds. Defaults to 3. See Limits.
TracingConfig FunctionTracingConfigArgs
Configuration block. Detailed below.
VpcConfig FunctionVpcConfigArgs
Configuration block. Detailed below.
architectures List<String>
Instruction set architecture for your Lambda function. Valid values are ["x86_64"] and ["arm64"]. Default is ["x86_64"]. Removing this attribute, function's architecture stay the same.
callback Object
The Javascript function to use as the entrypoint for the AWS Lambda out of. Either callback or callbackFactory must be provided.
callbackFactory Object
The Javascript function that will be called to produce the callback function that is the entrypoint for the AWS Lambda. Either callback or callbackFactory must be provided.
codePathOptions CodePathOptions
Options to control which paths/packages should be included or excluded in the zip file containing the code for the AWS lambda.
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
Configuration block. Detailed below.
description String
Description of what your Lambda Function does.
environment FunctionEnvironment
Configuration block. Detailed below.
ephemeralStorage FunctionEphemeralStorage
The amount of Ephemeral storage(/tmp) to allocate for the Lambda Function in MB. This parameter is used to expand the total amount of Ephemeral storage available, beyond the default amount of 512MB. Detailed below.
fileSystemConfig FunctionFileSystemConfig
Configuration block. Detailed below.
imageConfig FunctionImageConfig
Configuration block. Detailed below.
imageUri String
ECR image URI containing the function's deployment package. Exactly one of filename, image_uri, or s3_bucket must be specified.
kmsKeyArn String
Amazon Resource Name (ARN) of the AWS Key Management Service (KMS) key that is used to encrypt environment variables. If this configuration is not provided when environment variables are in use, AWS Lambda uses a default service key. If this configuration is provided when environment variables are not in use, the AWS Lambda API does not save this configuration and the provider will show a perpetual difference of adding the key. To fix the perpetual difference, remove this configuration.
layers List<String>
List of Lambda Layer Version ARNs (maximum of 5) to attach to your Lambda Function. See Lambda Layers
loggingConfig FunctionLoggingConfig
Configuration block used to specify advanced logging settings. Detailed below.
memorySize Integer
Amount of memory in MB your Lambda Function can use at runtime. Defaults to 128. See Limits
name Changes to this property will trigger replacement. String
Unique name for your Lambda Function.
packageType Changes to this property will trigger replacement. String
Lambda deployment package type. Valid values are Zip and Image. Defaults to Zip.
policies Map<String,String> | List<String>
A list of IAM policy ARNs to attach to the Function. Only one of role or policies can be provided. If neither is provided, the default policies will be used instead.
publish Boolean
Whether to publish creation/change as new Lambda Function Version. Defaults to false.
replaceSecurityGroupsOnDestroy Boolean
Whether to replace the security groups on the function's VPC configuration prior to destruction. Removing these security group associations prior to function destruction can speed up security group deletion times of AWS's internal cleanup operations. By default, the security groups will be replaced with the default security group in the function's configured VPC. Set the replacement_security_group_ids attribute to use a custom list of security groups for replacement.
replacementSecurityGroupIds List<String>
List of security group IDs to assign to the function's VPC configuration prior to destruction. replace_security_groups_on_destroy must be set to true to use this attribute.
reservedConcurrentExecutions Integer
Amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. Defaults to Unreserved Concurrency Limits -1. See Managing Concurrency
role Role | String
The execution role for the Lambda Function. The role provides the function's identity and access to AWS services and resources. Only one of role or policies can be provided. If neither is provided, the default policies will be used instead.
runtime Runtime
The Lambda runtime to use. If not provided, will default to NodeJS20dX.
s3Bucket String
S3 bucket location containing the function's deployment package. This bucket must reside in the same AWS region where you are creating the Lambda function. Exactly one of filename, image_uri, or s3_bucket must be specified. When s3_bucket is set, s3_key is required.
s3Key String
S3 key of an object containing the function's deployment package. When s3_bucket is set, s3_key is required.
s3ObjectVersion String
Object version containing the function's deployment package. Conflicts with filename and image_uri.
skipDestroy Boolean
Set to true if you do not wish the function to be deleted at destroy time, and instead just remove the function from the Pulumi state.
snapStart FunctionSnapStart
Snap start settings block. Detailed below.
sourceCodeHash String
Virtual attribute used to trigger replacement when source code changes. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.
tags Map<String,String>
Map of tags to assign to the object. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeout Integer
Amount of time your Lambda Function has to run in seconds. Defaults to 3. See Limits.
tracingConfig FunctionTracingConfig
Configuration block. Detailed below.
vpcConfig FunctionVpcConfig
Configuration block. Detailed below.
architectures string[]
Instruction set architecture for your Lambda function. Valid values are ["x86_64"] and ["arm64"]. Default is ["x86_64"]. Removing this attribute, function's architecture stay the same.
callback any
The Javascript function to use as the entrypoint for the AWS Lambda out of. Either callback or callbackFactory must be provided.
callbackFactory any
The Javascript function that will be called to produce the callback function that is the entrypoint for the AWS Lambda. Either callback or callbackFactory must be provided.
codePathOptions CodePathOptions
Options to control which paths/packages should be included or excluded in the zip file containing the code for the AWS lambda.
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
Configuration block. Detailed below.
description string
Description of what your Lambda Function does.
environment FunctionEnvironment
Configuration block. Detailed below.
ephemeralStorage FunctionEphemeralStorage
The amount of Ephemeral storage(/tmp) to allocate for the Lambda Function in MB. This parameter is used to expand the total amount of Ephemeral storage available, beyond the default amount of 512MB. Detailed below.
fileSystemConfig FunctionFileSystemConfig
Configuration block. Detailed below.
imageConfig FunctionImageConfig
Configuration block. Detailed below.
imageUri string
ECR image URI containing the function's deployment package. Exactly one of filename, image_uri, or s3_bucket must be specified.
kmsKeyArn string
Amazon Resource Name (ARN) of the AWS Key Management Service (KMS) key that is used to encrypt environment variables. If this configuration is not provided when environment variables are in use, AWS Lambda uses a default service key. If this configuration is provided when environment variables are not in use, the AWS Lambda API does not save this configuration and the provider will show a perpetual difference of adding the key. To fix the perpetual difference, remove this configuration.
layers string[]
List of Lambda Layer Version ARNs (maximum of 5) to attach to your Lambda Function. See Lambda Layers
loggingConfig FunctionLoggingConfig
Configuration block used to specify advanced logging settings. Detailed below.
memorySize number
Amount of memory in MB your Lambda Function can use at runtime. Defaults to 128. See Limits
name Changes to this property will trigger replacement. string
Unique name for your Lambda Function.
packageType Changes to this property will trigger replacement. string
Lambda deployment package type. Valid values are Zip and Image. Defaults to Zip.
policies {[key: string]: ARN} | ARN[]
A list of IAM policy ARNs to attach to the Function. Only one of role or policies can be provided. If neither is provided, the default policies will be used instead.
publish boolean
Whether to publish creation/change as new Lambda Function Version. Defaults to false.
replaceSecurityGroupsOnDestroy boolean
Whether to replace the security groups on the function's VPC configuration prior to destruction. Removing these security group associations prior to function destruction can speed up security group deletion times of AWS's internal cleanup operations. By default, the security groups will be replaced with the default security group in the function's configured VPC. Set the replacement_security_group_ids attribute to use a custom list of security groups for replacement.
replacementSecurityGroupIds string[]
List of security group IDs to assign to the function's VPC configuration prior to destruction. replace_security_groups_on_destroy must be set to true to use this attribute.
reservedConcurrentExecutions number
Amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. Defaults to Unreserved Concurrency Limits -1. See Managing Concurrency
role Role | ARN
The execution role for the Lambda Function. The role provides the function's identity and access to AWS services and resources. Only one of role or policies can be provided. If neither is provided, the default policies will be used instead.
runtime Runtime
The Lambda runtime to use. If not provided, will default to NodeJS20dX.
s3Bucket string
S3 bucket location containing the function's deployment package. This bucket must reside in the same AWS region where you are creating the Lambda function. Exactly one of filename, image_uri, or s3_bucket must be specified. When s3_bucket is set, s3_key is required.
s3Key string
S3 key of an object containing the function's deployment package. When s3_bucket is set, s3_key is required.
s3ObjectVersion string
Object version containing the function's deployment package. Conflicts with filename and image_uri.
skipDestroy boolean
Set to true if you do not wish the function to be deleted at destroy time, and instead just remove the function from the Pulumi state.
snapStart FunctionSnapStart
Snap start settings block. Detailed below.
sourceCodeHash string
Virtual attribute used to trigger replacement when source code changes. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.
tags {[key: string]: string}
Map of tags to assign to the object. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeout number
Amount of time your Lambda Function has to run in seconds. Defaults to 3. See Limits.
tracingConfig FunctionTracingConfig
Configuration block. Detailed below.
vpcConfig FunctionVpcConfig
Configuration block. Detailed below.
architectures Sequence[str]
Instruction set architecture for your Lambda function. Valid values are ["x86_64"] and ["arm64"]. Default is ["x86_64"]. Removing this attribute, function's architecture stay the same.
callback Any
The Javascript function to use as the entrypoint for the AWS Lambda out of. Either callback or callbackFactory must be provided.
callback_factory Any
The Javascript function that will be called to produce the callback function that is the entrypoint for the AWS Lambda. Either callback or callbackFactory must be provided.
code_path_options lambda_.CodePathOptionsArgs
Options to control which paths/packages should be included or excluded in the zip file containing the code for the AWS lambda.
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
Configuration block. Detailed below.
description str
Description of what your Lambda Function does.
environment lambda_.FunctionEnvironmentArgs
Configuration block. Detailed below.
ephemeral_storage lambda_.FunctionEphemeralStorageArgs
The amount of Ephemeral storage(/tmp) to allocate for the Lambda Function in MB. This parameter is used to expand the total amount of Ephemeral storage available, beyond the default amount of 512MB. Detailed below.
file_system_config lambda_.FunctionFileSystemConfigArgs
Configuration block. Detailed below.
image_config lambda_.FunctionImageConfigArgs
Configuration block. Detailed below.
image_uri str
ECR image URI containing the function's deployment package. Exactly one of filename, image_uri, or s3_bucket must be specified.
kms_key_arn str
Amazon Resource Name (ARN) of the AWS Key Management Service (KMS) key that is used to encrypt environment variables. If this configuration is not provided when environment variables are in use, AWS Lambda uses a default service key. If this configuration is provided when environment variables are not in use, the AWS Lambda API does not save this configuration and the provider will show a perpetual difference of adding the key. To fix the perpetual difference, remove this configuration.
layers Sequence[str]
List of Lambda Layer Version ARNs (maximum of 5) to attach to your Lambda Function. See Lambda Layers
logging_config lambda_.FunctionLoggingConfigArgs
Configuration block used to specify advanced logging settings. Detailed below.
memory_size int
Amount of memory in MB your Lambda Function can use at runtime. Defaults to 128. See Limits
name Changes to this property will trigger replacement. str
Unique name for your Lambda Function.
package_type Changes to this property will trigger replacement. str
Lambda deployment package type. Valid values are Zip and Image. Defaults to Zip.
policies Mapping[str, str] | Sequence[str]
A list of IAM policy ARNs to attach to the Function. Only one of role or policies can be provided. If neither is provided, the default policies will be used instead.
publish bool
Whether to publish creation/change as new Lambda Function Version. Defaults to false.
replace_security_groups_on_destroy bool
Whether to replace the security groups on the function's VPC configuration prior to destruction. Removing these security group associations prior to function destruction can speed up security group deletion times of AWS's internal cleanup operations. By default, the security groups will be replaced with the default security group in the function's configured VPC. Set the replacement_security_group_ids attribute to use a custom list of security groups for replacement.
replacement_security_group_ids Sequence[str]
List of security group IDs to assign to the function's VPC configuration prior to destruction. replace_security_groups_on_destroy must be set to true to use this attribute.
reserved_concurrent_executions int
Amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. Defaults to Unreserved Concurrency Limits -1. See Managing Concurrency
role Any | str
The execution role for the Lambda Function. The role provides the function's identity and access to AWS services and resources. Only one of role or policies can be provided. If neither is provided, the default policies will be used instead.
runtime lambda_.Runtime
The Lambda runtime to use. If not provided, will default to NodeJS20dX.
s3_bucket str
S3 bucket location containing the function's deployment package. This bucket must reside in the same AWS region where you are creating the Lambda function. Exactly one of filename, image_uri, or s3_bucket must be specified. When s3_bucket is set, s3_key is required.
s3_key str
S3 key of an object containing the function's deployment package. When s3_bucket is set, s3_key is required.
s3_object_version str
Object version containing the function's deployment package. Conflicts with filename and image_uri.
skip_destroy bool
Set to true if you do not wish the function to be deleted at destroy time, and instead just remove the function from the Pulumi state.
snap_start lambda_.FunctionSnapStartArgs
Snap start settings block. Detailed below.
source_code_hash str
Virtual attribute used to trigger replacement when source code changes. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.
tags Mapping[str, str]
Map of tags to assign to the object. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeout int
Amount of time your Lambda Function has to run in seconds. Defaults to 3. See Limits.
tracing_config lambda_.FunctionTracingConfigArgs
Configuration block. Detailed below.
vpc_config lambda_.FunctionVpcConfigArgs
Configuration block. Detailed below.
architectures List<String>
Instruction set architecture for your Lambda function. Valid values are ["x86_64"] and ["arm64"]. Default is ["x86_64"]. Removing this attribute, function's architecture stay the same.
callback Any
The Javascript function to use as the entrypoint for the AWS Lambda out of. Either callback or callbackFactory must be provided.
callbackFactory Any
The Javascript function that will be called to produce the callback function that is the entrypoint for the AWS Lambda. Either callback or callbackFactory must be provided.
codePathOptions Property Map
Options to control which paths/packages should be included or excluded in the zip file containing the code for the AWS lambda.
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
Configuration block. Detailed below.
description String
Description of what your Lambda Function does.
environment Property Map
Configuration block. Detailed below.
ephemeralStorage Property Map
The amount of Ephemeral storage(/tmp) to allocate for the Lambda Function in MB. This parameter is used to expand the total amount of Ephemeral storage available, beyond the default amount of 512MB. Detailed below.
fileSystemConfig Property Map
Configuration block. Detailed below.
imageConfig Property Map
Configuration block. Detailed below.
imageUri String
ECR image URI containing the function's deployment package. Exactly one of filename, image_uri, or s3_bucket must be specified.
kmsKeyArn String
Amazon Resource Name (ARN) of the AWS Key Management Service (KMS) key that is used to encrypt environment variables. If this configuration is not provided when environment variables are in use, AWS Lambda uses a default service key. If this configuration is provided when environment variables are not in use, the AWS Lambda API does not save this configuration and the provider will show a perpetual difference of adding the key. To fix the perpetual difference, remove this configuration.
layers List<String>
List of Lambda Layer Version ARNs (maximum of 5) to attach to your Lambda Function. See Lambda Layers
loggingConfig Property Map
Configuration block used to specify advanced logging settings. Detailed below.
memorySize Number
Amount of memory in MB your Lambda Function can use at runtime. Defaults to 128. See Limits
name Changes to this property will trigger replacement. String
Unique name for your Lambda Function.
packageType Changes to this property will trigger replacement. String
Lambda deployment package type. Valid values are Zip and Image. Defaults to Zip.
policies Map<> | List<>
A list of IAM policy ARNs to attach to the Function. Only one of role or policies can be provided. If neither is provided, the default policies will be used instead.
publish Boolean
Whether to publish creation/change as new Lambda Function Version. Defaults to false.
replaceSecurityGroupsOnDestroy Boolean
Whether to replace the security groups on the function's VPC configuration prior to destruction. Removing these security group associations prior to function destruction can speed up security group deletion times of AWS's internal cleanup operations. By default, the security groups will be replaced with the default security group in the function's configured VPC. Set the replacement_security_group_ids attribute to use a custom list of security groups for replacement.
replacementSecurityGroupIds List<String>
List of security group IDs to assign to the function's VPC configuration prior to destruction. replace_security_groups_on_destroy must be set to true to use this attribute.
reservedConcurrentExecutions Number
Amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. Defaults to Unreserved Concurrency Limits -1. See Managing Concurrency
role |
The execution role for the Lambda Function. The role provides the function's identity and access to AWS services and resources. Only one of role or policies can be provided. If neither is provided, the default policies will be used instead.
runtime "dotnet6" | "dotnet8" | "java11" | "java17" | "java21" | "java8.al2" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "provided.al2" | "provided.al2023" | "python3.10" | "python3.11" | "python3.12" | "python3.13" | "python3.9" | "ruby3.2" | "ruby3.3" | "dotnet5.0" | "dotnet7" | "dotnetcore2.1" | "dotnetcore3.1" | "go1.x" | "java8" | "nodejs10.x" | "nodejs12.x" | "nodejs14.x" | "nodejs16.x" | "provided" | "python2.7" | "python3.6" | "python3.7" | "python3.8" | "ruby2.5" | "ruby2.7"
The Lambda runtime to use. If not provided, will default to NodeJS20dX.
s3Bucket String
S3 bucket location containing the function's deployment package. This bucket must reside in the same AWS region where you are creating the Lambda function. Exactly one of filename, image_uri, or s3_bucket must be specified. When s3_bucket is set, s3_key is required.
s3Key String
S3 key of an object containing the function's deployment package. When s3_bucket is set, s3_key is required.
s3ObjectVersion String
Object version containing the function's deployment package. Conflicts with filename and image_uri.
skipDestroy Boolean
Set to true if you do not wish the function to be deleted at destroy time, and instead just remove the function from the Pulumi state.
snapStart Property Map
Snap start settings block. Detailed below.
sourceCodeHash String
Virtual attribute used to trigger replacement when source code changes. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key.
tags Map<String>
Map of tags to assign to the object. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeout Number
Amount of time your Lambda Function has to run in seconds. Defaults to 3. See Limits.
tracingConfig Property Map
Configuration block. Detailed below.
vpcConfig Property Map
Configuration block. Detailed below.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Arn string
Amazon Resource Name (ARN) identifying your Lambda Function.
Code Archive
Path to the function's deployment package within the local filesystem. Exactly one of filename, image_uri, or s3_bucket must be specified.
CodeSha256 string
Base64-encoded representation of raw SHA-256 sum of the zip file.
Handler string
Function entrypoint in your code.
InvokeArn string
ARN to be used for invoking Lambda Function from API Gateway - to be used in aws.apigateway.Integration's uri.
LastModified string
Date this resource was last modified.
QualifiedArn string
ARN identifying your Lambda Function Version (if versioning is enabled via publish = true).
QualifiedInvokeArn string
Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in aws.apigateway.Integration's uri.
RoleInstance string
The IAM role assigned to this Lambda function. Will be undefined if an ARN was provided for the role input property.
SigningJobArn string
ARN of the signing job.
SigningProfileVersionArn string
ARN of the signing profile version.
SourceCodeSize int
Size in bytes of the function .zip file.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Version string
Latest published version of your Lambda Function.
Id string
The provider-assigned unique ID for this managed resource.
Arn string
Amazon Resource Name (ARN) identifying your Lambda Function.
Code pulumi.Archive
Path to the function's deployment package within the local filesystem. Exactly one of filename, image_uri, or s3_bucket must be specified.
CodeSha256 string
Base64-encoded representation of raw SHA-256 sum of the zip file.
Handler string
Function entrypoint in your code.
InvokeArn string
ARN to be used for invoking Lambda Function from API Gateway - to be used in aws.apigateway.Integration's uri.
LastModified string
Date this resource was last modified.
QualifiedArn string
ARN identifying your Lambda Function Version (if versioning is enabled via publish = true).
QualifiedInvokeArn string
Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in aws.apigateway.Integration's uri.
RoleInstance string
The IAM role assigned to this Lambda function. Will be undefined if an ARN was provided for the role input property.
SigningJobArn string
ARN of the signing job.
SigningProfileVersionArn string
ARN of the signing profile version.
SourceCodeSize int
Size in bytes of the function .zip file.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Version string
Latest published version of your Lambda Function.
id String
The provider-assigned unique ID for this managed resource.
arn String
Amazon Resource Name (ARN) identifying your Lambda Function.
code Archive
Path to the function's deployment package within the local filesystem. Exactly one of filename, image_uri, or s3_bucket must be specified.
codeSha256 String
Base64-encoded representation of raw SHA-256 sum of the zip file.
handler String
Function entrypoint in your code.
invokeArn String
ARN to be used for invoking Lambda Function from API Gateway - to be used in aws.apigateway.Integration's uri.
lastModified String
Date this resource was last modified.
qualifiedArn String
ARN identifying your Lambda Function Version (if versioning is enabled via publish = true).
qualifiedInvokeArn String
Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in aws.apigateway.Integration's uri.
roleInstance String
The IAM role assigned to this Lambda function. Will be undefined if an ARN was provided for the role input property.
signingJobArn String
ARN of the signing job.
signingProfileVersionArn String
ARN of the signing profile version.
sourceCodeSize Integer
Size in bytes of the function .zip file.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

version String
Latest published version of your Lambda Function.
id string
The provider-assigned unique ID for this managed resource.
arn string
Amazon Resource Name (ARN) identifying your Lambda Function.
code pulumi.asset.Archive
Path to the function's deployment package within the local filesystem. Exactly one of filename, image_uri, or s3_bucket must be specified.
codeSha256 string
Base64-encoded representation of raw SHA-256 sum of the zip file.
handler string
Function entrypoint in your code.
invokeArn string
ARN to be used for invoking Lambda Function from API Gateway - to be used in aws.apigateway.Integration's uri.
lastModified string
Date this resource was last modified.
qualifiedArn string
ARN identifying your Lambda Function Version (if versioning is enabled via publish = true).
qualifiedInvokeArn string
Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in aws.apigateway.Integration's uri.
roleInstance string
The IAM role assigned to this Lambda function. Will be undefined if an ARN was provided for the role input property.
signingJobArn string
ARN of the signing job.
signingProfileVersionArn string
ARN of the signing profile version.
sourceCodeSize number
Size in bytes of the function .zip file.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

version string
Latest published version of your Lambda Function.
id str
The provider-assigned unique ID for this managed resource.
arn str
Amazon Resource Name (ARN) identifying your Lambda Function.
code pulumi.Archive
Path to the function's deployment package within the local filesystem. Exactly one of filename, image_uri, or s3_bucket must be specified.
code_sha256 str
Base64-encoded representation of raw SHA-256 sum of the zip file.
handler str
Function entrypoint in your code.
invoke_arn str
ARN to be used for invoking Lambda Function from API Gateway - to be used in aws.apigateway.Integration's uri.
last_modified str
Date this resource was last modified.
qualified_arn str
ARN identifying your Lambda Function Version (if versioning is enabled via publish = true).
qualified_invoke_arn str
Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in aws.apigateway.Integration's uri.
role_instance str
The IAM role assigned to this Lambda function. Will be undefined if an ARN was provided for the role input property.
signing_job_arn str
ARN of the signing job.
signing_profile_version_arn str
ARN of the signing profile version.
source_code_size int
Size in bytes of the function .zip file.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

version str
Latest published version of your Lambda Function.
id String
The provider-assigned unique ID for this managed resource.
arn String
Amazon Resource Name (ARN) identifying your Lambda Function.
code Archive
Path to the function's deployment package within the local filesystem. Exactly one of filename, image_uri, or s3_bucket must be specified.
codeSha256 String
Base64-encoded representation of raw SHA-256 sum of the zip file.
handler String
Function entrypoint in your code.
invokeArn String
ARN to be used for invoking Lambda Function from API Gateway - to be used in aws.apigateway.Integration's uri.
lastModified String
Date this resource was last modified.
qualifiedArn String
ARN identifying your Lambda Function Version (if versioning is enabled via publish = true).
qualifiedInvokeArn String
Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in aws.apigateway.Integration's uri.
roleInstance String
The IAM role assigned to this Lambda function. Will be undefined if an ARN was provided for the role input property.
signingJobArn String
ARN of the signing job.
signingProfileVersionArn String
ARN of the signing profile version.
sourceCodeSize Number
Size in bytes of the function .zip file.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

version String
Latest published version of your Lambda Function.

Supporting Types

CodePathOptions
, CodePathOptionsArgs

ExtraExcludePackages List<string>
Packages to explicitly exclude from the Assets for a serialized closure. This can be used when clients want to trim down the size of a closure, and they know that some package won't ever actually be needed at runtime, but is still a dependency of some package that is being used at runtime.
ExtraIncludePackages List<string>
Extra packages to include when producing the Assets for a serialized closure. This can be useful if the packages are acquired in a way that the serialization code does not understand. For example, if there was some sort of module that was pulled in based off of a computed string.
ExtraIncludePaths List<string>
Local file/directory paths that should be included when producing the Assets for a serialized closure.
ExtraExcludePackages []string
Packages to explicitly exclude from the Assets for a serialized closure. This can be used when clients want to trim down the size of a closure, and they know that some package won't ever actually be needed at runtime, but is still a dependency of some package that is being used at runtime.
ExtraIncludePackages []string
Extra packages to include when producing the Assets for a serialized closure. This can be useful if the packages are acquired in a way that the serialization code does not understand. For example, if there was some sort of module that was pulled in based off of a computed string.
ExtraIncludePaths []string
Local file/directory paths that should be included when producing the Assets for a serialized closure.
extraExcludePackages List<String>
Packages to explicitly exclude from the Assets for a serialized closure. This can be used when clients want to trim down the size of a closure, and they know that some package won't ever actually be needed at runtime, but is still a dependency of some package that is being used at runtime.
extraIncludePackages List<String>
Extra packages to include when producing the Assets for a serialized closure. This can be useful if the packages are acquired in a way that the serialization code does not understand. For example, if there was some sort of module that was pulled in based off of a computed string.
extraIncludePaths List<String>
Local file/directory paths that should be included when producing the Assets for a serialized closure.
extraExcludePackages string[]
Packages to explicitly exclude from the Assets for a serialized closure. This can be used when clients want to trim down the size of a closure, and they know that some package won't ever actually be needed at runtime, but is still a dependency of some package that is being used at runtime.
extraIncludePackages string[]
Extra packages to include when producing the Assets for a serialized closure. This can be useful if the packages are acquired in a way that the serialization code does not understand. For example, if there was some sort of module that was pulled in based off of a computed string.
extraIncludePaths string[]
Local file/directory paths that should be included when producing the Assets for a serialized closure.
extra_exclude_packages Sequence[str]
Packages to explicitly exclude from the Assets for a serialized closure. This can be used when clients want to trim down the size of a closure, and they know that some package won't ever actually be needed at runtime, but is still a dependency of some package that is being used at runtime.
extra_include_packages Sequence[str]
Extra packages to include when producing the Assets for a serialized closure. This can be useful if the packages are acquired in a way that the serialization code does not understand. For example, if there was some sort of module that was pulled in based off of a computed string.
extra_include_paths Sequence[str]
Local file/directory paths that should be included when producing the Assets for a serialized closure.
extraExcludePackages List<String>
Packages to explicitly exclude from the Assets for a serialized closure. This can be used when clients want to trim down the size of a closure, and they know that some package won't ever actually be needed at runtime, but is still a dependency of some package that is being used at runtime.
extraIncludePackages List<String>
Extra packages to include when producing the Assets for a serialized closure. This can be useful if the packages are acquired in a way that the serialization code does not understand. For example, if there was some sort of module that was pulled in based off of a computed string.
extraIncludePaths List<String>
Local file/directory paths that should be included when producing the Assets for a serialized closure.

FunctionDeadLetterConfig
, FunctionDeadLetterConfigArgs

TargetArn This property is required. string
ARN of an SNS topic or SQS queue to notify when an invocation fails. If this option is used, the function's IAM role must be granted suitable access to write to the target object, which means allowing either the sns:Publish or sqs:SendMessage action on this ARN, depending on which service is targeted.
TargetArn This property is required. string
ARN of an SNS topic or SQS queue to notify when an invocation fails. If this option is used, the function's IAM role must be granted suitable access to write to the target object, which means allowing either the sns:Publish or sqs:SendMessage action on this ARN, depending on which service is targeted.
targetArn This property is required. String
ARN of an SNS topic or SQS queue to notify when an invocation fails. If this option is used, the function's IAM role must be granted suitable access to write to the target object, which means allowing either the sns:Publish or sqs:SendMessage action on this ARN, depending on which service is targeted.
targetArn This property is required. string
ARN of an SNS topic or SQS queue to notify when an invocation fails. If this option is used, the function's IAM role must be granted suitable access to write to the target object, which means allowing either the sns:Publish or sqs:SendMessage action on this ARN, depending on which service is targeted.
target_arn This property is required. str
ARN of an SNS topic or SQS queue to notify when an invocation fails. If this option is used, the function's IAM role must be granted suitable access to write to the target object, which means allowing either the sns:Publish or sqs:SendMessage action on this ARN, depending on which service is targeted.
targetArn This property is required. String
ARN of an SNS topic or SQS queue to notify when an invocation fails. If this option is used, the function's IAM role must be granted suitable access to write to the target object, which means allowing either the sns:Publish or sqs:SendMessage action on this ARN, depending on which service is targeted.

FunctionEnvironment
, FunctionEnvironmentArgs

Variables Dictionary<string, string>
Map of environment variables that are accessible from the function code during execution. If provided at least one key must be present.
Variables map[string]string
Map of environment variables that are accessible from the function code during execution. If provided at least one key must be present.
variables Map<String,String>
Map of environment variables that are accessible from the function code during execution. If provided at least one key must be present.
variables {[key: string]: string}
Map of environment variables that are accessible from the function code during execution. If provided at least one key must be present.
variables Mapping[str, str]
Map of environment variables that are accessible from the function code during execution. If provided at least one key must be present.
variables Map<String>
Map of environment variables that are accessible from the function code during execution. If provided at least one key must be present.

FunctionEphemeralStorage
, FunctionEphemeralStorageArgs

Size int
The size of the Lambda function Ephemeral storage(/tmp) represented in MB. The minimum supported ephemeral_storage value defaults to 512MB and the maximum supported value is 10240MB.
Size int
The size of the Lambda function Ephemeral storage(/tmp) represented in MB. The minimum supported ephemeral_storage value defaults to 512MB and the maximum supported value is 10240MB.
size Integer
The size of the Lambda function Ephemeral storage(/tmp) represented in MB. The minimum supported ephemeral_storage value defaults to 512MB and the maximum supported value is 10240MB.
size number
The size of the Lambda function Ephemeral storage(/tmp) represented in MB. The minimum supported ephemeral_storage value defaults to 512MB and the maximum supported value is 10240MB.
size int
The size of the Lambda function Ephemeral storage(/tmp) represented in MB. The minimum supported ephemeral_storage value defaults to 512MB and the maximum supported value is 10240MB.
size Number
The size of the Lambda function Ephemeral storage(/tmp) represented in MB. The minimum supported ephemeral_storage value defaults to 512MB and the maximum supported value is 10240MB.

FunctionFileSystemConfig
, FunctionFileSystemConfigArgs

Arn This property is required. string
Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
LocalMountPath This property is required. string
Path where the function can access the file system, starting with /mnt/.
Arn This property is required. string
Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
LocalMountPath This property is required. string
Path where the function can access the file system, starting with /mnt/.
arn This property is required. String
Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
localMountPath This property is required. String
Path where the function can access the file system, starting with /mnt/.
arn This property is required. string
Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
localMountPath This property is required. string
Path where the function can access the file system, starting with /mnt/.
arn This property is required. str
Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
local_mount_path This property is required. str
Path where the function can access the file system, starting with /mnt/.
arn This property is required. String
Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
localMountPath This property is required. String
Path where the function can access the file system, starting with /mnt/.

FunctionImageConfig
, FunctionImageConfigArgs

Commands List<string>
Parameters that you want to pass in with entry_point.
EntryPoints List<string>
Entry point to your application, which is typically the location of the runtime executable.
WorkingDirectory string
Working directory.
Commands []string
Parameters that you want to pass in with entry_point.
EntryPoints []string
Entry point to your application, which is typically the location of the runtime executable.
WorkingDirectory string
Working directory.
commands List<String>
Parameters that you want to pass in with entry_point.
entryPoints List<String>
Entry point to your application, which is typically the location of the runtime executable.
workingDirectory String
Working directory.
commands string[]
Parameters that you want to pass in with entry_point.
entryPoints string[]
Entry point to your application, which is typically the location of the runtime executable.
workingDirectory string
Working directory.
commands Sequence[str]
Parameters that you want to pass in with entry_point.
entry_points Sequence[str]
Entry point to your application, which is typically the location of the runtime executable.
working_directory str
Working directory.
commands List<String>
Parameters that you want to pass in with entry_point.
entryPoints List<String>
Entry point to your application, which is typically the location of the runtime executable.
workingDirectory String
Working directory.

FunctionLoggingConfig
, FunctionLoggingConfigArgs

LogFormat This property is required. string
select between Text and structured JSON format for your function's logs.
ApplicationLogLevel string
for JSON structured logs, choose the detail level of the logs your application sends to CloudWatch when using supported logging libraries.
LogGroup string
the CloudWatch log group your function sends logs to.
SystemLogLevel string
for JSON structured logs, choose the detail level of the Lambda platform event logs sent to CloudWatch, such as ERROR, DEBUG, or INFO.
LogFormat This property is required. string
select between Text and structured JSON format for your function's logs.
ApplicationLogLevel string
for JSON structured logs, choose the detail level of the logs your application sends to CloudWatch when using supported logging libraries.
LogGroup string
the CloudWatch log group your function sends logs to.
SystemLogLevel string
for JSON structured logs, choose the detail level of the Lambda platform event logs sent to CloudWatch, such as ERROR, DEBUG, or INFO.
logFormat This property is required. String
select between Text and structured JSON format for your function's logs.
applicationLogLevel String
for JSON structured logs, choose the detail level of the logs your application sends to CloudWatch when using supported logging libraries.
logGroup String
the CloudWatch log group your function sends logs to.
systemLogLevel String
for JSON structured logs, choose the detail level of the Lambda platform event logs sent to CloudWatch, such as ERROR, DEBUG, or INFO.
logFormat This property is required. string
select between Text and structured JSON format for your function's logs.
applicationLogLevel string
for JSON structured logs, choose the detail level of the logs your application sends to CloudWatch when using supported logging libraries.
logGroup string
the CloudWatch log group your function sends logs to.
systemLogLevel string
for JSON structured logs, choose the detail level of the Lambda platform event logs sent to CloudWatch, such as ERROR, DEBUG, or INFO.
log_format This property is required. str
select between Text and structured JSON format for your function's logs.
application_log_level str
for JSON structured logs, choose the detail level of the logs your application sends to CloudWatch when using supported logging libraries.
log_group str
the CloudWatch log group your function sends logs to.
system_log_level str
for JSON structured logs, choose the detail level of the Lambda platform event logs sent to CloudWatch, such as ERROR, DEBUG, or INFO.
logFormat This property is required. String
select between Text and structured JSON format for your function's logs.
applicationLogLevel String
for JSON structured logs, choose the detail level of the logs your application sends to CloudWatch when using supported logging libraries.
logGroup String
the CloudWatch log group your function sends logs to.
systemLogLevel String
for JSON structured logs, choose the detail level of the Lambda platform event logs sent to CloudWatch, such as ERROR, DEBUG, or INFO.

FunctionSnapStart
, FunctionSnapStartArgs

ApplyOn This property is required. string
Conditions where snap start is enabled. Valid values are PublishedVersions.
OptimizationStatus string
Optimization status of the snap start configuration. Valid values are On and Off.
ApplyOn This property is required. string
Conditions where snap start is enabled. Valid values are PublishedVersions.
OptimizationStatus string
Optimization status of the snap start configuration. Valid values are On and Off.
applyOn This property is required. String
Conditions where snap start is enabled. Valid values are PublishedVersions.
optimizationStatus String
Optimization status of the snap start configuration. Valid values are On and Off.
applyOn This property is required. string
Conditions where snap start is enabled. Valid values are PublishedVersions.
optimizationStatus string
Optimization status of the snap start configuration. Valid values are On and Off.
apply_on This property is required. str
Conditions where snap start is enabled. Valid values are PublishedVersions.
optimization_status str
Optimization status of the snap start configuration. Valid values are On and Off.
applyOn This property is required. String
Conditions where snap start is enabled. Valid values are PublishedVersions.
optimizationStatus String
Optimization status of the snap start configuration. Valid values are On and Off.

FunctionTracingConfig
, FunctionTracingConfigArgs

Mode This property is required. string
Whether to sample and trace a subset of incoming requests with AWS X-Ray. Valid values are PassThrough and Active. If PassThrough, Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1". If Active, Lambda will respect any tracing header it receives from an upstream service. If no tracing header is received, Lambda will call X-Ray for a tracing decision.
Mode This property is required. string
Whether to sample and trace a subset of incoming requests with AWS X-Ray. Valid values are PassThrough and Active. If PassThrough, Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1". If Active, Lambda will respect any tracing header it receives from an upstream service. If no tracing header is received, Lambda will call X-Ray for a tracing decision.
mode This property is required. String
Whether to sample and trace a subset of incoming requests with AWS X-Ray. Valid values are PassThrough and Active. If PassThrough, Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1". If Active, Lambda will respect any tracing header it receives from an upstream service. If no tracing header is received, Lambda will call X-Ray for a tracing decision.
mode This property is required. string
Whether to sample and trace a subset of incoming requests with AWS X-Ray. Valid values are PassThrough and Active. If PassThrough, Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1". If Active, Lambda will respect any tracing header it receives from an upstream service. If no tracing header is received, Lambda will call X-Ray for a tracing decision.
mode This property is required. str
Whether to sample and trace a subset of incoming requests with AWS X-Ray. Valid values are PassThrough and Active. If PassThrough, Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1". If Active, Lambda will respect any tracing header it receives from an upstream service. If no tracing header is received, Lambda will call X-Ray for a tracing decision.
mode This property is required. String
Whether to sample and trace a subset of incoming requests with AWS X-Ray. Valid values are PassThrough and Active. If PassThrough, Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1". If Active, Lambda will respect any tracing header it receives from an upstream service. If no tracing header is received, Lambda will call X-Ray for a tracing decision.

FunctionVpcConfig
, FunctionVpcConfigArgs

SecurityGroupIds This property is required. List<string>
List of security group IDs associated with the Lambda function.
SubnetIds This property is required. List<string>
List of subnet IDs associated with the Lambda function.
Ipv6AllowedForDualStack bool
Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. Default is false.
VpcId string
ID of the VPC.
SecurityGroupIds This property is required. []string
List of security group IDs associated with the Lambda function.
SubnetIds This property is required. []string
List of subnet IDs associated with the Lambda function.
Ipv6AllowedForDualStack bool
Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. Default is false.
VpcId string
ID of the VPC.
securityGroupIds This property is required. List<String>
List of security group IDs associated with the Lambda function.
subnetIds This property is required. List<String>
List of subnet IDs associated with the Lambda function.
ipv6AllowedForDualStack Boolean
Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. Default is false.
vpcId String
ID of the VPC.
securityGroupIds This property is required. string[]
List of security group IDs associated with the Lambda function.
subnetIds This property is required. string[]
List of subnet IDs associated with the Lambda function.
ipv6AllowedForDualStack boolean
Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. Default is false.
vpcId string
ID of the VPC.
security_group_ids This property is required. Sequence[str]
List of security group IDs associated with the Lambda function.
subnet_ids This property is required. Sequence[str]
List of subnet IDs associated with the Lambda function.
ipv6_allowed_for_dual_stack bool
Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. Default is false.
vpc_id str
ID of the VPC.
securityGroupIds This property is required. List<String>
List of security group IDs associated with the Lambda function.
subnetIds This property is required. List<String>
List of subnet IDs associated with the Lambda function.
ipv6AllowedForDualStack Boolean
Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. Default is false.
vpcId String
ID of the VPC.

Runtime
, RuntimeArgs

Dotnet6
dotnet6
Dotnet8
dotnet8
Java11
java11
Java17
java17
Java21
java21
Java8AL2
java8.al2
NodeJS18dX
nodejs18.x
NodeJS20dX
nodejs20.x
NodeJS22dX
nodejs22.x
CustomAL2
provided.al2
CustomAL2023
provided.al2023
Python3d10
python3.10
Python3d11
python3.11
Python3d12
python3.12
Python3d13
python3.13
Python3d9
python3.9
Ruby3d2
ruby3.2
Ruby3d3
ruby3.3
Dotnet5d0
dotnet5.0

Deprecated: This runtime is now deprecated

Dotnet7
dotnet7

Deprecated: This runtime is now deprecated

DotnetCore2d1
dotnetcore2.1

Deprecated: This runtime is now deprecated

DotnetCore3d1
dotnetcore3.1

Deprecated: This runtime is now deprecated

Go1dx
go1.x

Deprecated: This runtime is now deprecated

Java8
java8

Deprecated: This runtime is now deprecated

NodeJS10dX
nodejs10.x

Deprecated: This runtime is now deprecated

NodeJS12dX
nodejs12.x

Deprecated: This runtime is now deprecated

NodeJS14dX
nodejs14.x

Deprecated: This runtime is now deprecated

NodeJS16dX
nodejs16.x

Deprecated: This runtime is now deprecated

Custom
provided

Deprecated: This runtime is now deprecated

Python2d7
python2.7

Deprecated: This runtime is now deprecated

Python3d6
python3.6

Deprecated: This runtime is now deprecated

Python3d7
python3.7

Deprecated: This runtime is now deprecated

Python3d8
python3.8

Deprecated: This runtime is now deprecated

Ruby2d5
ruby2.5

Deprecated: This runtime is now deprecated

Ruby2d7
ruby2.7

Deprecated: This runtime is now deprecated

RuntimeDotnet6
dotnet6
RuntimeDotnet8
dotnet8
RuntimeJava11
java11
RuntimeJava17
java17
RuntimeJava21
java21
RuntimeJava8AL2
java8.al2
RuntimeNodeJS18dX
nodejs18.x
RuntimeNodeJS20dX
nodejs20.x
RuntimeNodeJS22dX
nodejs22.x
RuntimeCustomAL2
provided.al2
RuntimeCustomAL2023
provided.al2023
RuntimePython3d10
python3.10
RuntimePython3d11
python3.11
RuntimePython3d12
python3.12
RuntimePython3d13
python3.13
RuntimePython3d9
python3.9
RuntimeRuby3d2
ruby3.2
RuntimeRuby3d3
ruby3.3
RuntimeDotnet5d0
dotnet5.0

Deprecated: This runtime is now deprecated

RuntimeDotnet7
dotnet7

Deprecated: This runtime is now deprecated

RuntimeDotnetCore2d1
dotnetcore2.1

Deprecated: This runtime is now deprecated

RuntimeDotnetCore3d1
dotnetcore3.1

Deprecated: This runtime is now deprecated

RuntimeGo1dx
go1.x

Deprecated: This runtime is now deprecated

RuntimeJava8
java8

Deprecated: This runtime is now deprecated

RuntimeNodeJS10dX
nodejs10.x

Deprecated: This runtime is now deprecated

RuntimeNodeJS12dX
nodejs12.x

Deprecated: This runtime is now deprecated

RuntimeNodeJS14dX
nodejs14.x

Deprecated: This runtime is now deprecated

RuntimeNodeJS16dX
nodejs16.x

Deprecated: This runtime is now deprecated

RuntimeCustom
provided

Deprecated: This runtime is now deprecated

RuntimePython2d7
python2.7

Deprecated: This runtime is now deprecated

RuntimePython3d6
python3.6

Deprecated: This runtime is now deprecated

RuntimePython3d7
python3.7

Deprecated: This runtime is now deprecated

RuntimePython3d8
python3.8

Deprecated: This runtime is now deprecated

RuntimeRuby2d5
ruby2.5

Deprecated: This runtime is now deprecated

RuntimeRuby2d7
ruby2.7

Deprecated: This runtime is now deprecated

Dotnet6
dotnet6
Dotnet8
dotnet8
Java11
java11
Java17
java17
Java21
java21
Java8AL2
java8.al2
NodeJS18dX
nodejs18.x
NodeJS20dX
nodejs20.x
NodeJS22dX
nodejs22.x
CustomAL2
provided.al2
CustomAL2023
provided.al2023
Python3d10
python3.10
Python3d11
python3.11
Python3d12
python3.12
Python3d13
python3.13
Python3d9
python3.9
Ruby3d2
ruby3.2
Ruby3d3
ruby3.3
Dotnet5d0
dotnet5.0

Deprecated: This runtime is now deprecated

Dotnet7
dotnet7

Deprecated: This runtime is now deprecated

DotnetCore2d1
dotnetcore2.1

Deprecated: This runtime is now deprecated

DotnetCore3d1
dotnetcore3.1

Deprecated: This runtime is now deprecated

Go1dx
go1.x

Deprecated: This runtime is now deprecated

Java8
java8

Deprecated: This runtime is now deprecated

NodeJS10dX
nodejs10.x

Deprecated: This runtime is now deprecated

NodeJS12dX
nodejs12.x

Deprecated: This runtime is now deprecated

NodeJS14dX
nodejs14.x

Deprecated: This runtime is now deprecated

NodeJS16dX
nodejs16.x

Deprecated: This runtime is now deprecated

Custom
provided

Deprecated: This runtime is now deprecated

Python2d7
python2.7

Deprecated: This runtime is now deprecated

Python3d6
python3.6

Deprecated: This runtime is now deprecated

Python3d7
python3.7

Deprecated: This runtime is now deprecated

Python3d8
python3.8

Deprecated: This runtime is now deprecated

Ruby2d5
ruby2.5

Deprecated: This runtime is now deprecated

Ruby2d7
ruby2.7

Deprecated: This runtime is now deprecated

Dotnet6
dotnet6
Dotnet8
dotnet8
Java11
java11
Java17
java17
Java21
java21
Java8AL2
java8.al2
NodeJS18dX
nodejs18.x
NodeJS20dX
nodejs20.x
NodeJS22dX
nodejs22.x
CustomAL2
provided.al2
CustomAL2023
provided.al2023
Python3d10
python3.10
Python3d11
python3.11
Python3d12
python3.12
Python3d13
python3.13
Python3d9
python3.9
Ruby3d2
ruby3.2
Ruby3d3
ruby3.3
Dotnet5d0
dotnet5.0

Deprecated: This runtime is now deprecated

Dotnet7
dotnet7

Deprecated: This runtime is now deprecated

DotnetCore2d1
dotnetcore2.1

Deprecated: This runtime is now deprecated

DotnetCore3d1
dotnetcore3.1

Deprecated: This runtime is now deprecated

Go1dx
go1.x

Deprecated: This runtime is now deprecated

Java8
java8

Deprecated: This runtime is now deprecated

NodeJS10dX
nodejs10.x

Deprecated: This runtime is now deprecated

NodeJS12dX
nodejs12.x

Deprecated: This runtime is now deprecated

NodeJS14dX
nodejs14.x

Deprecated: This runtime is now deprecated

NodeJS16dX
nodejs16.x

Deprecated: This runtime is now deprecated

Custom
provided

Deprecated: This runtime is now deprecated

Python2d7
python2.7

Deprecated: This runtime is now deprecated

Python3d6
python3.6

Deprecated: This runtime is now deprecated

Python3d7
python3.7

Deprecated: This runtime is now deprecated

Python3d8
python3.8

Deprecated: This runtime is now deprecated

Ruby2d5
ruby2.5

Deprecated: This runtime is now deprecated

Ruby2d7
ruby2.7

Deprecated: This runtime is now deprecated

DOTNET6
dotnet6
DOTNET8
dotnet8
JAVA11
java11
JAVA17
java17
JAVA21
java21
JAVA8_AL2
java8.al2
NODE_JS18D_X
nodejs18.x
NODE_JS20D_X
nodejs20.x
NODE_JS22D_X
nodejs22.x
CUSTOM_AL2
provided.al2
CUSTOM_AL2023
provided.al2023
PYTHON3D10
python3.10
PYTHON3D11
python3.11
PYTHON3D12
python3.12
PYTHON3D13
python3.13
PYTHON3D9
python3.9
RUBY3D2
ruby3.2
RUBY3D3
ruby3.3
DOTNET5D0
dotnet5.0

Deprecated: This runtime is now deprecated

DOTNET7
dotnet7

Deprecated: This runtime is now deprecated

DOTNET_CORE2D1
dotnetcore2.1

Deprecated: This runtime is now deprecated

DOTNET_CORE3D1
dotnetcore3.1

Deprecated: This runtime is now deprecated

GO1DX
go1.x

Deprecated: This runtime is now deprecated

JAVA8
java8

Deprecated: This runtime is now deprecated

NODE_JS10D_X
nodejs10.x

Deprecated: This runtime is now deprecated

NODE_JS12D_X
nodejs12.x

Deprecated: This runtime is now deprecated

NODE_JS14D_X
nodejs14.x

Deprecated: This runtime is now deprecated

NODE_JS16D_X
nodejs16.x

Deprecated: This runtime is now deprecated

CUSTOM
provided

Deprecated: This runtime is now deprecated

PYTHON2D7
python2.7

Deprecated: This runtime is now deprecated

PYTHON3D6
python3.6

Deprecated: This runtime is now deprecated

PYTHON3D7
python3.7

Deprecated: This runtime is now deprecated

PYTHON3D8
python3.8

Deprecated: This runtime is now deprecated

RUBY2D5
ruby2.5

Deprecated: This runtime is now deprecated

RUBY2D7
ruby2.7

Deprecated: This runtime is now deprecated

"dotnet6"
dotnet6
"dotnet8"
dotnet8
"java11"
java11
"java17"
java17
"java21"
java21
"java8.al2"
java8.al2
"nodejs18.x"
nodejs18.x
"nodejs20.x"
nodejs20.x
"nodejs22.x"
nodejs22.x
"provided.al2"
provided.al2
"provided.al2023"
provided.al2023
"python3.10"
python3.10
"python3.11"
python3.11
"python3.12"
python3.12
"python3.13"
python3.13
"python3.9"
python3.9
"ruby3.2"
ruby3.2
"ruby3.3"
ruby3.3
"dotnet5.0"
dotnet5.0

Deprecated: This runtime is now deprecated

"dotnet7"
dotnet7

Deprecated: This runtime is now deprecated

"dotnetcore2.1"
dotnetcore2.1

Deprecated: This runtime is now deprecated

"dotnetcore3.1"
dotnetcore3.1

Deprecated: This runtime is now deprecated

"go1.x"
go1.x

Deprecated: This runtime is now deprecated

"java8"
java8

Deprecated: This runtime is now deprecated

"nodejs10.x"
nodejs10.x

Deprecated: This runtime is now deprecated

"nodejs12.x"
nodejs12.x

Deprecated: This runtime is now deprecated

"nodejs14.x"
nodejs14.x

Deprecated: This runtime is now deprecated

"nodejs16.x"
nodejs16.x

Deprecated: This runtime is now deprecated

"provided"
provided

Deprecated: This runtime is now deprecated

"python2.7"
python2.7

Deprecated: This runtime is now deprecated

"python3.6"
python3.6

Deprecated: This runtime is now deprecated

"python3.7"
python3.7

Deprecated: This runtime is now deprecated

"python3.8"
python3.8

Deprecated: This runtime is now deprecated

"ruby2.5"
ruby2.5

Deprecated: This runtime is now deprecated

"ruby2.7"
ruby2.7

Deprecated: This runtime is now deprecated

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.