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 */,
});
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",
],
},
});
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,
],
});
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,
],
});
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"
]
}
},
// ...
}
Example Usage
Basic Lambda Function
Coming soon!
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;
}
},
});
Coming soon!
Lambda Function with expensive initialization work
Coming soon!
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);
}
}
});
Coming soon!
API Gateway Handler Function
Coming soon!
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;
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 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 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 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 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 String
- The unique name of the resource.
- args 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",
},
});
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"),
},
})
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());
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",
})
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",
},
});
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
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.
- Callback
Factory 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.
- Code
Path CodeOptions Path Options - Options to control which paths/packages should be included or excluded in the zip file containing the code for the AWS lambda.
- Code
Signing stringConfig Arn - 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 FunctionConfig Dead Letter Config - Configuration block. Detailed below.
- Description string
- Description of what your Lambda Function does.
- Environment
Function
Environment - Configuration block. Detailed below.
- Ephemeral
Storage FunctionEphemeral Storage - 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 of512
MB. Detailed below. - File
System FunctionConfig File System Config - Configuration block. Detailed below.
- Image
Config FunctionImage Config - Configuration block. Detailed below.
- Image
Uri string - ECR image URI containing the function's deployment package. Exactly one of
filename
,image_uri
, ors3_bucket
must be specified. - Kms
Key stringArn - 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
- Logging
Config FunctionLogging Config - 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 string
- Unique name for your Lambda Function.
- Package
Type string - Lambda deployment package type. Valid values are
Zip
andImage
. Defaults toZip
. - Policies Dictionary<string, string> | List<string>
- A list of IAM policy ARNs to attach to the Function. Only one of
role
orpolicies
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 boolGroups On Destroy - 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 thereplacement_security_group_ids
attribute to use a custom list of security groups for replacement. - Replacement
Security List<string>Group Ids - List of security group IDs to assign to the function's VPC configuration prior to destruction.
replace_security_groups_on_destroy
must be set totrue
to use this attribute. - Reserved
Concurrent intExecutions - 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
orpolicies
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
, ors3_bucket
must be specified. Whens3_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. - S3Object
Version string - Object version containing the function's deployment package. Conflicts with
filename
andimage_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 FunctionSnap Start - Snap start settings block. Detailed below.
- Source
Code stringHash - 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
ors3_key
. - 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. - Tracing
Config FunctionTracing Config - Configuration block. Detailed below.
- Vpc
Config FunctionVpc Config - 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.
- Callback
Factory 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.
- Code
Path CodeOptions Path Options Args - Options to control which paths/packages should be included or excluded in the zip file containing the code for the AWS lambda.
- Code
Signing stringConfig Arn - 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 FunctionConfig Dead Letter Config Args - Configuration block. Detailed below.
- Description string
- Description of what your Lambda Function does.
- Environment
Function
Environment Args - Configuration block. Detailed below.
- Ephemeral
Storage FunctionEphemeral Storage Args - 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 of512
MB. Detailed below. - File
System FunctionConfig File System Config Args - Configuration block. Detailed below.
- Image
Config FunctionImage Config Args - Configuration block. Detailed below.
- Image
Uri string - ECR image URI containing the function's deployment package. Exactly one of
filename
,image_uri
, ors3_bucket
must be specified. - Kms
Key stringArn - 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
- Logging
Config FunctionLogging Config Args - 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 string
- Unique name for your Lambda Function.
- Package
Type string - Lambda deployment package type. Valid values are
Zip
andImage
. Defaults toZip
. - Policies map[string]string | []string
- A list of IAM policy ARNs to attach to the Function. Only one of
role
orpolicies
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 boolGroups On Destroy - 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 thereplacement_security_group_ids
attribute to use a custom list of security groups for replacement. - Replacement
Security []stringGroup Ids - List of security group IDs to assign to the function's VPC configuration prior to destruction.
replace_security_groups_on_destroy
must be set totrue
to use this attribute. - Reserved
Concurrent intExecutions - 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
orpolicies
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
, ors3_bucket
must be specified. Whens3_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. - S3Object
Version string - Object version containing the function's deployment package. Conflicts with
filename
andimage_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 FunctionSnap Start Args - Snap start settings block. Detailed below.
- Source
Code stringHash - 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
ors3_key
. - 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. - Tracing
Config FunctionTracing Config Args - Configuration block. Detailed below.
- Vpc
Config FunctionVpc Config Args - 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.
- callback
Factory 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.
- code
Path CodeOptions Path Options - Options to control which paths/packages should be included or excluded in the zip file containing the code for the AWS lambda.
- code
Signing StringConfig Arn - 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 FunctionConfig Dead Letter Config - Configuration block. Detailed below.
- description String
- Description of what your Lambda Function does.
- environment
Function
Environment - Configuration block. Detailed below.
- ephemeral
Storage FunctionEphemeral Storage - 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 of512
MB. Detailed below. - file
System FunctionConfig File System Config - Configuration block. Detailed below.
- image
Config FunctionImage Config - Configuration block. Detailed below.
- image
Uri String - ECR image URI containing the function's deployment package. Exactly one of
filename
,image_uri
, ors3_bucket
must be specified. - kms
Key StringArn - 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
- logging
Config FunctionLogging Config - Configuration block used to specify advanced logging settings. Detailed below.
- memory
Size Integer - Amount of memory in MB your Lambda Function can use at runtime. Defaults to
128
. See Limits - name String
- Unique name for your Lambda Function.
- package
Type String - Lambda deployment package type. Valid values are
Zip
andImage
. Defaults toZip
. - policies Map<String,String> | List<String>
- A list of IAM policy ARNs to attach to the Function. Only one of
role
orpolicies
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
. - replace
Security BooleanGroups On Destroy - 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 thereplacement_security_group_ids
attribute to use a custom list of security groups for replacement. - replacement
Security List<String>Group Ids - List of security group IDs to assign to the function's VPC configuration prior to destruction.
replace_security_groups_on_destroy
must be set totrue
to use this attribute. - reserved
Concurrent IntegerExecutions - 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
orpolicies
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
, ors3_bucket
must be specified. Whens3_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. - s3Object
Version String - Object version containing the function's deployment package. Conflicts with
filename
andimage_uri
. - skip
Destroy 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.
- snap
Start FunctionSnap Start - Snap start settings block. Detailed below.
- source
Code StringHash - 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
ors3_key
. - 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. - tracing
Config FunctionTracing Config - Configuration block. Detailed below.
- vpc
Config FunctionVpc Config - 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.
- 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 CodeOptions Path Options - Options to control which paths/packages should be included or excluded in the zip file containing the code for the AWS lambda.
- code
Signing stringConfig Arn - 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 FunctionConfig Dead Letter Config - Configuration block. Detailed below.
- description string
- Description of what your Lambda Function does.
- environment
Function
Environment - Configuration block. Detailed below.
- ephemeral
Storage FunctionEphemeral Storage - 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 of512
MB. Detailed below. - file
System FunctionConfig File System Config - Configuration block. Detailed below.
- image
Config FunctionImage Config - Configuration block. Detailed below.
- image
Uri string - ECR image URI containing the function's deployment package. Exactly one of
filename
,image_uri
, ors3_bucket
must be specified. - kms
Key stringArn - 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
- logging
Config FunctionLogging Config - Configuration block used to specify advanced logging settings. Detailed below.
- memory
Size number - Amount of memory in MB your Lambda Function can use at runtime. Defaults to
128
. See Limits - name string
- Unique name for your Lambda Function.
- package
Type string - Lambda deployment package type. Valid values are
Zip
andImage
. Defaults toZip
. - policies {[key: string]: ARN} | ARN[]
- A list of IAM policy ARNs to attach to the Function. Only one of
role
orpolicies
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
. - replace
Security booleanGroups On Destroy - 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 thereplacement_security_group_ids
attribute to use a custom list of security groups for replacement. - replacement
Security string[]Group Ids - List of security group IDs to assign to the function's VPC configuration prior to destruction.
replace_security_groups_on_destroy
must be set totrue
to use this attribute. - reserved
Concurrent numberExecutions - 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
orpolicies
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
, ors3_bucket
must be specified. Whens3_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. - s3Object
Version string - Object version containing the function's deployment package. Conflicts with
filename
andimage_uri
. - skip
Destroy 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.
- snap
Start FunctionSnap Start - Snap start settings block. Detailed below.
- source
Code stringHash - 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
ors3_key
. - {[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. - tracing
Config FunctionTracing Config - Configuration block. Detailed below.
- vpc
Config FunctionVpc Config - 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_ lambda_.options Code Path Options Args - Options to control which paths/packages should be included or excluded in the zip file containing the code for the AWS lambda.
- code_
signing_ strconfig_ arn - 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_ lambda_.config Function Dead Letter Config Args - Configuration block. Detailed below.
- description str
- Description of what your Lambda Function does.
- environment
lambda_.
Function Environment Args - Configuration block. Detailed below.
- ephemeral_
storage lambda_.Function Ephemeral Storage Args - 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 of512
MB. Detailed below. - file_
system_ lambda_.config Function File System Config Args - Configuration block. Detailed below.
- image_
config lambda_.Function Image Config Args - Configuration block. Detailed below.
- image_
uri str - ECR image URI containing the function's deployment package. Exactly one of
filename
,image_uri
, ors3_bucket
must be specified. - kms_
key_ strarn - 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_.Function Logging Config Args - 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 str
- Unique name for your Lambda Function.
- package_
type str - Lambda deployment package type. Valid values are
Zip
andImage
. Defaults toZip
. - policies Mapping[str, str] | Sequence[str]
- A list of IAM policy ARNs to attach to the Function. Only one of
role
orpolicies
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_ boolgroups_ on_ destroy - 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 thereplacement_security_group_ids
attribute to use a custom list of security groups for replacement. - replacement_
security_ Sequence[str]group_ ids - List of security group IDs to assign to the function's VPC configuration prior to destruction.
replace_security_groups_on_destroy
must be set totrue
to use this attribute. - reserved_
concurrent_ intexecutions - 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
orpolicies
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
, ors3_bucket
must be specified. Whens3_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_ strversion - Object version containing the function's deployment package. Conflicts with
filename
andimage_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_.Function Snap Start Args - Snap start settings block. Detailed below.
- source_
code_ strhash - 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
ors3_key
. - 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_.Function Tracing Config Args - Configuration block. Detailed below.
- vpc_
config lambda_.Function Vpc Config Args - 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.
- 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 Property MapOptions - Options to control which paths/packages should be included or excluded in the zip file containing the code for the AWS lambda.
- code
Signing StringConfig Arn - 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 Property MapConfig - Configuration block. Detailed below.
- description String
- Description of what your Lambda Function does.
- environment Property Map
- Configuration block. Detailed below.
- ephemeral
Storage 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 of512
MB. Detailed below. - file
System Property MapConfig - Configuration block. Detailed below.
- image
Config Property Map - Configuration block. Detailed below.
- image
Uri String - ECR image URI containing the function's deployment package. Exactly one of
filename
,image_uri
, ors3_bucket
must be specified. - kms
Key StringArn - 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
- logging
Config Property Map - Configuration block used to specify advanced logging settings. Detailed below.
- memory
Size Number - Amount of memory in MB your Lambda Function can use at runtime. Defaults to
128
. See Limits - name String
- Unique name for your Lambda Function.
- package
Type String - Lambda deployment package type. Valid values are
Zip
andImage
. Defaults toZip
. - policies Map<> | List<>
- A list of IAM policy ARNs to attach to the Function. Only one of
role
orpolicies
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
. - replace
Security BooleanGroups On Destroy - 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 thereplacement_security_group_ids
attribute to use a custom list of security groups for replacement. - replacement
Security List<String>Group Ids - List of security group IDs to assign to the function's VPC configuration prior to destruction.
replace_security_groups_on_destroy
must be set totrue
to use this attribute. - reserved
Concurrent NumberExecutions - 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
orpolicies
can be provided. If neither is provided, the default policies will be used instead. - runtime "dotnet6" | "dotnet7" | "dotnet8" | "java11" | "java17" | "java21" | "java8.al2" | "nodejs18.x" | "nodejs20.x" | "provided.al2" | "provided.al2023" | "python3.10" | "python3.11" | "python3.12" | "python3.8" | "python3.9" | "ruby3.2" | "dotnet5.0" | "dotnetcore2.1" | "dotnetcore3.1" | "go1.x" | "java8" | "nodejs10.x" | "nodejs12.x" | "nodejs14.x" | "nodejs16.x" | "provided" | "python2.7" | "python3.6" | "python3.7" | "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
, ors3_bucket
must be specified. Whens3_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. - s3Object
Version String - Object version containing the function's deployment package. Conflicts with
filename
andimage_uri
. - skip
Destroy 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.
- snap
Start Property Map - Snap start settings block. Detailed below.
- source
Code StringHash - 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
ors3_key
. - 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. - tracing
Config Property Map - Configuration block. Detailed below.
- vpc
Config 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
, ors3_bucket
must be specified. - Code
Sha256 string - Base64-encoded representation of raw SHA-256 sum of the zip file.
- Handler string
- Function entrypoint in your code.
- Invoke
Arn string - ARN to be used for invoking Lambda Function from API Gateway - to be used in
aws.apigateway.Integration
'suri
. - Last
Modified string - Date this resource was last modified.
- Qualified
Arn string - ARN identifying your Lambda Function Version (if versioning is enabled via
publish = true
). - Qualified
Invoke stringArn - Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in
aws.apigateway.Integration
'suri
. - Role
Instance string - The IAM role assigned to this Lambda function. Will be undefined if an ARN was provided for the role input property.
- Signing
Job stringArn - ARN of the signing job.
- Signing
Profile stringVersion Arn - ARN of the signing profile version.
- Source
Code intSize - Size in bytes of the function .zip file.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - 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
, ors3_bucket
must be specified. - Code
Sha256 string - Base64-encoded representation of raw SHA-256 sum of the zip file.
- Handler string
- Function entrypoint in your code.
- Invoke
Arn string - ARN to be used for invoking Lambda Function from API Gateway - to be used in
aws.apigateway.Integration
'suri
. - Last
Modified string - Date this resource was last modified.
- Qualified
Arn string - ARN identifying your Lambda Function Version (if versioning is enabled via
publish = true
). - Qualified
Invoke stringArn - Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in
aws.apigateway.Integration
'suri
. - Role
Instance string - The IAM role assigned to this Lambda function. Will be undefined if an ARN was provided for the role input property.
- Signing
Job stringArn - ARN of the signing job.
- Signing
Profile stringVersion Arn - ARN of the signing profile version.
- Source
Code intSize - Size in bytes of the function .zip file.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - 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
, ors3_bucket
must be specified. - code
Sha256 String - Base64-encoded representation of raw SHA-256 sum of the zip file.
- handler String
- Function entrypoint in your code.
- invoke
Arn String - ARN to be used for invoking Lambda Function from API Gateway - to be used in
aws.apigateway.Integration
'suri
. - last
Modified String - Date this resource was last modified.
- qualified
Arn String - ARN identifying your Lambda Function Version (if versioning is enabled via
publish = true
). - qualified
Invoke StringArn - Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in
aws.apigateway.Integration
'suri
. - role
Instance String - The IAM role assigned to this Lambda function. Will be undefined if an ARN was provided for the role input property.
- signing
Job StringArn - ARN of the signing job.
- signing
Profile StringVersion Arn - ARN of the signing profile version.
- source
Code IntegerSize - Size in bytes of the function .zip file.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - 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
, ors3_bucket
must be specified. - code
Sha256 string - Base64-encoded representation of raw SHA-256 sum of the zip file.
- handler string
- Function entrypoint in your code.
- invoke
Arn string - ARN to be used for invoking Lambda Function from API Gateway - to be used in
aws.apigateway.Integration
'suri
. - last
Modified string - Date this resource was last modified.
- qualified
Arn string - ARN identifying your Lambda Function Version (if versioning is enabled via
publish = true
). - qualified
Invoke stringArn - Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in
aws.apigateway.Integration
'suri
. - role
Instance string - The IAM role assigned to this Lambda function. Will be undefined if an ARN was provided for the role input property.
- signing
Job stringArn - ARN of the signing job.
- signing
Profile stringVersion Arn - ARN of the signing profile version.
- source
Code numberSize - Size in bytes of the function .zip file.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - 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
, ors3_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
'suri
. - 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_ strarn - Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in
aws.apigateway.Integration
'suri
. - 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_ strarn - ARN of the signing job.
- signing_
profile_ strversion_ arn - ARN of the signing profile version.
- source_
code_ intsize - Size in bytes of the function .zip file.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - 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
, ors3_bucket
must be specified. - code
Sha256 String - Base64-encoded representation of raw SHA-256 sum of the zip file.
- handler String
- Function entrypoint in your code.
- invoke
Arn String - ARN to be used for invoking Lambda Function from API Gateway - to be used in
aws.apigateway.Integration
'suri
. - last
Modified String - Date this resource was last modified.
- qualified
Arn String - ARN identifying your Lambda Function Version (if versioning is enabled via
publish = true
). - qualified
Invoke StringArn - Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in
aws.apigateway.Integration
'suri
. - role
Instance String - The IAM role assigned to this Lambda function. Will be undefined if an ARN was provided for the role input property.
- signing
Job StringArn - ARN of the signing job.
- signing
Profile StringVersion Arn - ARN of the signing profile version.
- source
Code NumberSize - Size in bytes of the function .zip file.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - version String
- Latest published version of your Lambda Function.
Supporting Types
CodePathOptions, CodePathOptionsArgs
- Extra
Exclude List<string>Packages - 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 List<string>Packages - 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 List<string>Paths - Local file/directory paths that should be included when producing the Assets for a serialized closure.
- Extra
Exclude []stringPackages - 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 []stringPackages - 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 []stringPaths - Local file/directory paths that should be included when producing the Assets for a serialized closure.
- extra
Exclude List<String>Packages - 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 List<String>Packages - 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 List<String>Paths - Local file/directory paths that should be included when producing the Assets for a serialized closure.
- extra
Exclude string[]Packages - 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 string[]Packages - 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 string[]Paths - Local file/directory paths that should be included when producing the Assets for a serialized closure.
- extra_
exclude_ Sequence[str]packages - 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_ Sequence[str]packages - 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_ Sequence[str]paths - Local file/directory paths that should be included when producing the Assets for a serialized closure.
- extra
Exclude List<String>Packages - 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 List<String>Packages - 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 List<String>Paths - Local file/directory paths that should be included when producing the Assets for a serialized closure.
FunctionDeadLetterConfig, FunctionDeadLetterConfigArgs
- Target
Arn 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
orsqs:SendMessage
action on this ARN, depending on which service is targeted.
- Target
Arn 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
orsqs:SendMessage
action on this ARN, depending on which service is targeted.
- target
Arn 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
orsqs:SendMessage
action on this ARN, depending on which service is targeted.
- target
Arn 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
orsqs:SendMessage
action on this ARN, depending on which service is targeted.
- target_
arn 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
orsqs:SendMessage
action on this ARN, depending on which service is targeted.
- target
Arn 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
orsqs: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 supportedephemeral_storage
value defaults to512
MB and the maximum supported value is10240
MB.
- Size int
- The size of the Lambda function Ephemeral storage(
/tmp
) represented in MB. The minimum supportedephemeral_storage
value defaults to512
MB and the maximum supported value is10240
MB.
- size Integer
- The size of the Lambda function Ephemeral storage(
/tmp
) represented in MB. The minimum supportedephemeral_storage
value defaults to512
MB and the maximum supported value is10240
MB.
- size number
- The size of the Lambda function Ephemeral storage(
/tmp
) represented in MB. The minimum supportedephemeral_storage
value defaults to512
MB and the maximum supported value is10240
MB.
- size int
- The size of the Lambda function Ephemeral storage(
/tmp
) represented in MB. The minimum supportedephemeral_storage
value defaults to512
MB and the maximum supported value is10240
MB.
- size Number
- The size of the Lambda function Ephemeral storage(
/tmp
) represented in MB. The minimum supportedephemeral_storage
value defaults to512
MB and the maximum supported value is10240
MB.
FunctionFileSystemConfig, FunctionFileSystemConfigArgs
- Arn string
- Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
- Local
Mount stringPath - Path where the function can access the file system, starting with /mnt/.
- Arn string
- Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
- Local
Mount stringPath - Path where the function can access the file system, starting with /mnt/.
- arn String
- Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
- local
Mount StringPath - Path where the function can access the file system, starting with /mnt/.
- arn string
- Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
- local
Mount stringPath - Path where the function can access the file system, starting with /mnt/.
- arn str
- Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
- local_
mount_ strpath - Path where the function can access the file system, starting with /mnt/.
- arn String
- Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
- local
Mount StringPath - 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
. - Entry
Points List<string> - Entry point to your application, which is typically the location of the runtime executable.
- Working
Directory string - Working directory.
- Commands []string
- Parameters that you want to pass in with
entry_point
. - Entry
Points []string - Entry point to your application, which is typically the location of the runtime executable.
- Working
Directory string - Working directory.
- commands List<String>
- Parameters that you want to pass in with
entry_point
. - entry
Points List<String> - Entry point to your application, which is typically the location of the runtime executable.
- working
Directory String - Working directory.
- commands string[]
- Parameters that you want to pass in with
entry_point
. - entry
Points string[] - Entry point to your application, which is typically the location of the runtime executable.
- working
Directory 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
. - entry
Points List<String> - Entry point to your application, which is typically the location of the runtime executable.
- working
Directory String - Working directory.
FunctionLoggingConfig, FunctionLoggingConfigArgs
- Log
Format string - select between
Text
and structuredJSON
format for your function's logs. - Application
Log stringLevel - for JSON structured logs, choose the detail level of the logs your application sends to CloudWatch when using supported logging libraries.
- Log
Group string - the CloudWatch log group your function sends logs to.
- System
Log stringLevel - for JSON structured logs, choose the detail level of the Lambda platform event logs sent to CloudWatch, such as
ERROR
,DEBUG
, orINFO
.
- Log
Format string - select between
Text
and structuredJSON
format for your function's logs. - Application
Log stringLevel - for JSON structured logs, choose the detail level of the logs your application sends to CloudWatch when using supported logging libraries.
- Log
Group string - the CloudWatch log group your function sends logs to.
- System
Log stringLevel - for JSON structured logs, choose the detail level of the Lambda platform event logs sent to CloudWatch, such as
ERROR
,DEBUG
, orINFO
.
- log
Format String - select between
Text
and structuredJSON
format for your function's logs. - application
Log StringLevel - for JSON structured logs, choose the detail level of the logs your application sends to CloudWatch when using supported logging libraries.
- log
Group String - the CloudWatch log group your function sends logs to.
- system
Log StringLevel - for JSON structured logs, choose the detail level of the Lambda platform event logs sent to CloudWatch, such as
ERROR
,DEBUG
, orINFO
.
- log
Format string - select between
Text
and structuredJSON
format for your function's logs. - application
Log stringLevel - for JSON structured logs, choose the detail level of the logs your application sends to CloudWatch when using supported logging libraries.
- log
Group string - the CloudWatch log group your function sends logs to.
- system
Log stringLevel - for JSON structured logs, choose the detail level of the Lambda platform event logs sent to CloudWatch, such as
ERROR
,DEBUG
, orINFO
.
- log_
format str - select between
Text
and structuredJSON
format for your function's logs. - application_
log_ strlevel - 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_ strlevel - for JSON structured logs, choose the detail level of the Lambda platform event logs sent to CloudWatch, such as
ERROR
,DEBUG
, orINFO
.
- log
Format String - select between
Text
and structuredJSON
format for your function's logs. - application
Log StringLevel - for JSON structured logs, choose the detail level of the logs your application sends to CloudWatch when using supported logging libraries.
- log
Group String - the CloudWatch log group your function sends logs to.
- system
Log StringLevel - for JSON structured logs, choose the detail level of the Lambda platform event logs sent to CloudWatch, such as
ERROR
,DEBUG
, orINFO
.
FunctionSnapStart, FunctionSnapStartArgs
- Apply
On string - Conditions where snap start is enabled. Valid values are
PublishedVersions
. - Optimization
Status string - Optimization status of the snap start configuration. Valid values are
On
andOff
.
- Apply
On string - Conditions where snap start is enabled. Valid values are
PublishedVersions
. - Optimization
Status string - Optimization status of the snap start configuration. Valid values are
On
andOff
.
- apply
On String - Conditions where snap start is enabled. Valid values are
PublishedVersions
. - optimization
Status String - Optimization status of the snap start configuration. Valid values are
On
andOff
.
- apply
On string - Conditions where snap start is enabled. Valid values are
PublishedVersions
. - optimization
Status string - Optimization status of the snap start configuration. Valid values are
On
andOff
.
- apply_
on 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
andOff
.
- apply
On String - Conditions where snap start is enabled. Valid values are
PublishedVersions
. - optimization
Status String - Optimization status of the snap start configuration. Valid values are
On
andOff
.
FunctionTracingConfig, FunctionTracingConfigArgs
- Mode string
- Whether to sample and trace a subset of incoming requests with AWS X-Ray. Valid values are
PassThrough
andActive
. IfPassThrough
, Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1". IfActive
, 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 string
- Whether to sample and trace a subset of incoming requests with AWS X-Ray. Valid values are
PassThrough
andActive
. IfPassThrough
, Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1". IfActive
, 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 String
- Whether to sample and trace a subset of incoming requests with AWS X-Ray. Valid values are
PassThrough
andActive
. IfPassThrough
, Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1". IfActive
, 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 string
- Whether to sample and trace a subset of incoming requests with AWS X-Ray. Valid values are
PassThrough
andActive
. IfPassThrough
, Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1". IfActive
, 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 str
- Whether to sample and trace a subset of incoming requests with AWS X-Ray. Valid values are
PassThrough
andActive
. IfPassThrough
, Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1". IfActive
, 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 String
- Whether to sample and trace a subset of incoming requests with AWS X-Ray. Valid values are
PassThrough
andActive
. IfPassThrough
, Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1". IfActive
, 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
- Security
Group List<string>Ids - List of security group IDs associated with the Lambda function.
- Subnet
Ids List<string> - List of subnet IDs associated with the Lambda function.
- Ipv6Allowed
For boolDual Stack - Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. Default is
false
. - Vpc
Id string - ID of the VPC.
- Security
Group []stringIds - List of security group IDs associated with the Lambda function.
- Subnet
Ids []string - List of subnet IDs associated with the Lambda function.
- Ipv6Allowed
For boolDual Stack - Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. Default is
false
. - Vpc
Id string - ID of the VPC.
- security
Group List<String>Ids - List of security group IDs associated with the Lambda function.
- subnet
Ids List<String> - List of subnet IDs associated with the Lambda function.
- ipv6Allowed
For BooleanDual Stack - Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. Default is
false
. - vpc
Id String - ID of the VPC.
- security
Group string[]Ids - List of security group IDs associated with the Lambda function.
- subnet
Ids string[] - List of subnet IDs associated with the Lambda function.
- ipv6Allowed
For booleanDual Stack - Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. Default is
false
. - vpc
Id string - ID of the VPC.
- security_
group_ Sequence[str]ids - List of security group IDs associated with the Lambda function.
- subnet_
ids Sequence[str] - List of subnet IDs associated with the Lambda function.
- ipv6_
allowed_ boolfor_ dual_ stack - Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. Default is
false
. - vpc_
id str - ID of the VPC.
- security
Group List<String>Ids - List of security group IDs associated with the Lambda function.
- subnet
Ids List<String> - List of subnet IDs associated with the Lambda function.
- ipv6Allowed
For BooleanDual Stack - Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. Default is
false
. - vpc
Id String - ID of the VPC.
Runtime, RuntimeArgs
- Dotnet6
- dotnet6
- Dotnet7
- dotnet7
- Dotnet8
- dotnet8
- Java11
- java11
- Java17
- java17
- Java21
- java21
- Java8AL2
- java8.al2
- Node
JS18d X - nodejs18.x
- Node
JS20d X - nodejs20.x
- Custom
AL2 - provided.al2
- Custom
AL2023 - provided.al2023
- Python3d10
- python3.10
- Python3d11
- python3.11
- Python3d12
- python3.12
- Python3d8
- python3.8
- Python3d9
- python3.9
- Ruby3d2
- ruby3.2
- Dotnet5d0
- dotnet5.0
- Dotnet
Core2d1 - dotnetcore2.1
- Dotnet
Core3d1 - dotnetcore3.1
- Go1dx
- go1.x
- Java8
- java8
- Node
JS10d X - nodejs10.x
- Node
JS12d X - nodejs12.x
- Node
JS14d X - nodejs14.x
- Node
JS16d X - nodejs16.x
- Custom
- provided
- Python2d7
- python2.7
- Python3d6
- python3.6
- Python3d7
- python3.7
- Ruby2d5
- ruby2.5
- Ruby2d7
- ruby2.7
- Runtime
Dotnet6 - dotnet6
- Runtime
Dotnet7 - dotnet7
- Runtime
Dotnet8 - dotnet8
- Runtime
Java11 - java11
- Runtime
Java17 - java17
- Runtime
Java21 - java21
- Runtime
Java8AL2 - java8.al2
- Runtime
Node JS18d X - nodejs18.x
- Runtime
Node JS20d X - nodejs20.x
- Runtime
Custom AL2 - provided.al2
- Runtime
Custom AL2023 - provided.al2023
- Runtime
Python3d10 - python3.10
- Runtime
Python3d11 - python3.11
- Runtime
Python3d12 - python3.12
- Runtime
Python3d8 - python3.8
- Runtime
Python3d9 - python3.9
- Runtime
Ruby3d2 - ruby3.2
- Runtime
Dotnet5d0 - dotnet5.0
- Runtime
Dotnet Core2d1 - dotnetcore2.1
- Runtime
Dotnet Core3d1 - dotnetcore3.1
- Runtime
Go1dx - go1.x
- Runtime
Java8 - java8
- Runtime
Node JS10d X - nodejs10.x
- Runtime
Node JS12d X - nodejs12.x
- Runtime
Node JS14d X - nodejs14.x
- Runtime
Node JS16d X - nodejs16.x
- Runtime
Custom - provided
- Runtime
Python2d7 - python2.7
- Runtime
Python3d6 - python3.6
- Runtime
Python3d7 - python3.7
- Runtime
Ruby2d5 - ruby2.5
- Runtime
Ruby2d7 - ruby2.7
- Dotnet6
- dotnet6
- Dotnet7
- dotnet7
- Dotnet8
- dotnet8
- Java11
- java11
- Java17
- java17
- Java21
- java21
- Java8AL2
- java8.al2
- Node
JS18d X - nodejs18.x
- Node
JS20d X - nodejs20.x
- Custom
AL2 - provided.al2
- Custom
AL2023 - provided.al2023
- Python3d10
- python3.10
- Python3d11
- python3.11
- Python3d12
- python3.12
- Python3d8
- python3.8
- Python3d9
- python3.9
- Ruby3d2
- ruby3.2
- Dotnet5d0
- dotnet5.0
- Dotnet
Core2d1 - dotnetcore2.1
- Dotnet
Core3d1 - dotnetcore3.1
- Go1dx
- go1.x
- Java8
- java8
- Node
JS10d X - nodejs10.x
- Node
JS12d X - nodejs12.x
- Node
JS14d X - nodejs14.x
- Node
JS16d X - nodejs16.x
- Custom
- provided
- Python2d7
- python2.7
- Python3d6
- python3.6
- Python3d7
- python3.7
- Ruby2d5
- ruby2.5
- Ruby2d7
- ruby2.7
- Dotnet6
- dotnet6
- Dotnet7
- dotnet7
- Dotnet8
- dotnet8
- Java11
- java11
- Java17
- java17
- Java21
- java21
- Java8AL2
- java8.al2
- Node
JS18d X - nodejs18.x
- Node
JS20d X - nodejs20.x
- Custom
AL2 - provided.al2
- Custom
AL2023 - provided.al2023
- Python3d10
- python3.10
- Python3d11
- python3.11
- Python3d12
- python3.12
- Python3d8
- python3.8
- Python3d9
- python3.9
- Ruby3d2
- ruby3.2
- Dotnet5d0
- dotnet5.0
- Dotnet
Core2d1 - dotnetcore2.1
- Dotnet
Core3d1 - dotnetcore3.1
- Go1dx
- go1.x
- Java8
- java8
- Node
JS10d X - nodejs10.x
- Node
JS12d X - nodejs12.x
- Node
JS14d X - nodejs14.x
- Node
JS16d X - nodejs16.x
- Custom
- provided
- Python2d7
- python2.7
- Python3d6
- python3.6
- Python3d7
- python3.7
- Ruby2d5
- ruby2.5
- Ruby2d7
- ruby2.7
- DOTNET6
- dotnet6
- DOTNET7
- dotnet7
- DOTNET8
- dotnet8
- JAVA11
- java11
- JAVA17
- java17
- JAVA21
- java21
- JAVA8_AL2
- java8.al2
- NODE_JS18D_X
- nodejs18.x
- NODE_JS20D_X
- nodejs20.x
- CUSTOM_AL2
- provided.al2
- CUSTOM_AL2023
- provided.al2023
- PYTHON3D10
- python3.10
- PYTHON3D11
- python3.11
- PYTHON3D12
- python3.12
- PYTHON3D8
- python3.8
- PYTHON3D9
- python3.9
- RUBY3D2
- ruby3.2
- DOTNET5D0
- dotnet5.0
- DOTNET_CORE2D1
- dotnetcore2.1
- DOTNET_CORE3D1
- dotnetcore3.1
- GO1DX
- go1.x
- JAVA8
- java8
- NODE_JS10D_X
- nodejs10.x
- NODE_JS12D_X
- nodejs12.x
- NODE_JS14D_X
- nodejs14.x
- NODE_JS16D_X
- nodejs16.x
- CUSTOM
- provided
- PYTHON2D7
- python2.7
- PYTHON3D6
- python3.6
- PYTHON3D7
- python3.7
- RUBY2D5
- ruby2.5
- RUBY2D7
- ruby2.7
- "dotnet6"
- dotnet6
- "dotnet7"
- dotnet7
- "dotnet8"
- dotnet8
- "java11"
- java11
- "java17"
- java17
- "java21"
- java21
- "java8.al2"
- java8.al2
- "nodejs18.x"
- nodejs18.x
- "nodejs20.x"
- nodejs20.x
- "provided.al2"
- provided.al2
- "provided.al2023"
- provided.al2023
- "python3.10"
- python3.10
- "python3.11"
- python3.11
- "python3.12"
- python3.12
- "python3.8"
- python3.8
- "python3.9"
- python3.9
- "ruby3.2"
- ruby3.2
- "dotnet5.0"
- dotnet5.0
- "dotnetcore2.1"
- dotnetcore2.1
- "dotnetcore3.1"
- dotnetcore3.1
- "go1.x"
- go1.x
- "java8"
- java8
- "nodejs10.x"
- nodejs10.x
- "nodejs12.x"
- nodejs12.x
- "nodejs14.x"
- nodejs14.x
- "nodejs16.x"
- nodejs16.x
- "provided"
- provided
- "python2.7"
- python2.7
- "python3.6"
- python3.6
- "python3.7"
- python3.7
- "ruby2.5"
- ruby2.5
- "ruby2.7"
- ruby2.7
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.