AWS Native is in preview. AWS Classic is fully supported.
aws-native.lambda.Function
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
Resource Type definition for AWS::Lambda::Function in region
Example Usage
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var primer = new AwsNative.Lambda.Function("primer", new()
{
Runtime = "nodejs18.x",
Role = "arn:aws:iam::123456789012:role/lambda-role",
Handler = "index.handler",
Code = new AwsNative.Lambda.Inputs.FunctionCodeArgs
{
ZipFile = @"const { S3Client, ListBucketsCommand } = require(""@aws-sdk/client-s3"");
const s3 = new S3Client({ region: ""us-east-1"" }); // replace ""us-east-1"" with your AWS region
exports.handler = async function(event) {
const command = new ListBucketsCommand({});
const response = await s3.send(command);
return response.Buckets;
};
",
},
Description = "List Amazon S3 buckets in us-east-1.",
TracingConfig = new AwsNative.Lambda.Inputs.FunctionTracingConfigArgs
{
Mode = AwsNative.Lambda.FunctionTracingConfigMode.Active,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/lambda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lambda.NewFunction(ctx, "primer", &lambda.FunctionArgs{
Runtime: pulumi.String("nodejs18.x"),
Role: pulumi.String("arn:aws:iam::123456789012:role/lambda-role"),
Handler: pulumi.String("index.handler"),
Code: &lambda.FunctionCodeArgs{
ZipFile: pulumi.String(`const { S3Client, ListBucketsCommand } = require("@aws-sdk/client-s3");
const s3 = new S3Client({ region: "us-east-1" }); // replace "us-east-1" with your AWS region
exports.handler = async function(event) {
const command = new ListBucketsCommand({});
const response = await s3.send(command);
return response.Buckets;
};
`),
},
Description: pulumi.String("List Amazon S3 buckets in us-east-1."),
TracingConfig: &lambda.FunctionTracingConfigArgs{
Mode: lambda.FunctionTracingConfigModeActive,
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_aws_native as aws_native
primer = aws_native.lambda_.Function("primer",
runtime="nodejs18.x",
role="arn:aws:iam::123456789012:role/lambda-role",
handler="index.handler",
code=aws_native.lambda_.FunctionCodeArgs(
zip_file="""const { S3Client, ListBucketsCommand } = require("@aws-sdk/client-s3");
const s3 = new S3Client({ region: "us-east-1" }); // replace "us-east-1" with your AWS region
exports.handler = async function(event) {
const command = new ListBucketsCommand({});
const response = await s3.send(command);
return response.Buckets;
};
""",
),
description="List Amazon S3 buckets in us-east-1.",
tracing_config=aws_native.lambda_.FunctionTracingConfigArgs(
mode=aws_native.lambda_.FunctionTracingConfigMode.ACTIVE,
))
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const primer = new aws_native.lambda.Function("primer", {
runtime: "nodejs18.x",
role: "arn:aws:iam::123456789012:role/lambda-role",
handler: "index.handler",
code: {
zipFile: `const { S3Client, ListBucketsCommand } = require("@aws-sdk/client-s3");
const s3 = new S3Client({ region: "us-east-1" }); // replace "us-east-1" with your AWS region
exports.handler = async function(event) {
const command = new ListBucketsCommand({});
const response = await s3.send(command);
return response.Buckets;
};
`,
},
description: "List Amazon S3 buckets in us-east-1.",
tracingConfig: {
mode: aws_native.lambda.FunctionTracingConfigMode.Active,
},
});
Coming soon!
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var function = new AwsNative.Lambda.Function("function", new()
{
Handler = "index.handler",
Role = "arn:aws:iam::123456789012:role/lambda-role",
Code = new AwsNative.Lambda.Inputs.FunctionCodeArgs
{
S3Bucket = "my-bucket",
S3Key = "function.zip",
},
Runtime = "nodejs18.x",
Timeout = 5,
TracingConfig = new AwsNative.Lambda.Inputs.FunctionTracingConfigArgs
{
Mode = AwsNative.Lambda.FunctionTracingConfigMode.Active,
},
VpcConfig = new AwsNative.Lambda.Inputs.FunctionVpcConfigArgs
{
SecurityGroupIds = new[]
{
"sg-085912345678492fb",
},
SubnetIds = new[]
{
"subnet-071f712345678e7c8",
"subnet-07fd123456788a036",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/lambda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lambda.NewFunction(ctx, "function", &lambda.FunctionArgs{
Handler: pulumi.String("index.handler"),
Role: pulumi.String("arn:aws:iam::123456789012:role/lambda-role"),
Code: &lambda.FunctionCodeArgs{
S3Bucket: pulumi.String("my-bucket"),
S3Key: pulumi.String("function.zip"),
},
Runtime: pulumi.String("nodejs18.x"),
Timeout: pulumi.Int(5),
TracingConfig: &lambda.FunctionTracingConfigArgs{
Mode: lambda.FunctionTracingConfigModeActive,
},
VpcConfig: &lambda.FunctionVpcConfigArgs{
SecurityGroupIds: pulumi.StringArray{
pulumi.String("sg-085912345678492fb"),
},
SubnetIds: pulumi.StringArray{
pulumi.String("subnet-071f712345678e7c8"),
pulumi.String("subnet-07fd123456788a036"),
},
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_aws_native as aws_native
function = aws_native.lambda_.Function("function",
handler="index.handler",
role="arn:aws:iam::123456789012:role/lambda-role",
code=aws_native.lambda_.FunctionCodeArgs(
s3_bucket="my-bucket",
s3_key="function.zip",
),
runtime="nodejs18.x",
timeout=5,
tracing_config=aws_native.lambda_.FunctionTracingConfigArgs(
mode=aws_native.lambda_.FunctionTracingConfigMode.ACTIVE,
),
vpc_config=aws_native.lambda_.FunctionVpcConfigArgs(
security_group_ids=["sg-085912345678492fb"],
subnet_ids=[
"subnet-071f712345678e7c8",
"subnet-07fd123456788a036",
],
))
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const _function = new aws_native.lambda.Function("function", {
handler: "index.handler",
role: "arn:aws:iam::123456789012:role/lambda-role",
code: {
s3Bucket: "my-bucket",
s3Key: "function.zip",
},
runtime: "nodejs18.x",
timeout: 5,
tracingConfig: {
mode: aws_native.lambda.FunctionTracingConfigMode.Active,
},
vpcConfig: {
securityGroupIds: ["sg-085912345678492fb"],
subnetIds: [
"subnet-071f712345678e7c8",
"subnet-07fd123456788a036",
],
},
});
Coming soon!
Create Function Resource
new Function(name: string, args: FunctionArgs, opts?: CustomResourceOptions);
@overload
def Function(resource_name: str,
opts: Optional[ResourceOptions] = None,
architectures: Optional[Sequence[lambda_.FunctionArchitecturesItem]] = None,
code: Optional[_lambda_.FunctionCodeArgs] = 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_configs: Optional[Sequence[_lambda_.FunctionFileSystemConfigArgs]] = None,
function_name: Optional[str] = None,
handler: Optional[str] = None,
image_config: Optional[_lambda_.FunctionImageConfigArgs] = None,
kms_key_arn: Optional[str] = None,
layers: Optional[Sequence[str]] = None,
memory_size: Optional[int] = None,
package_type: Optional[lambda_.FunctionPackageType] = None,
reserved_concurrent_executions: Optional[int] = None,
role: Optional[str] = None,
runtime: Optional[str] = None,
runtime_management_config: Optional[_lambda_.FunctionRuntimeManagementConfigArgs] = None,
snap_start: Optional[_lambda_.FunctionSnapStartArgs] = None,
tags: Optional[Sequence[_lambda_.FunctionTagArgs]] = None,
timeout: Optional[int] = None,
tracing_config: Optional[_lambda_.FunctionTracingConfigArgs] = None,
vpc_config: Optional[_lambda_.FunctionVpcConfigArgs] = None)
@overload
def Function(resource_name: str,
args: FunctionArgs,
opts: Optional[ResourceOptions] = None)
func NewFunction(ctx *Context, name string, args FunctionArgs, opts ...ResourceOption) (*Function, error)
public Function(string name, FunctionArgs args, CustomResourceOptions? opts = null)
public Function(String name, FunctionArgs args)
public Function(String name, FunctionArgs args, CustomResourceOptions options)
type: aws-native:lambda:Function
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FunctionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args FunctionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FunctionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FunctionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FunctionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Function Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Function resource accepts the following input properties:
- Code
Pulumi.
Aws Native. Lambda. Inputs. Function Code The code for the function.
- Role string
The Amazon Resource Name (ARN) of the function's execution role.
- Architectures
List<Pulumi.
Aws Native. Lambda. Function Architectures Item> - Code
Signing stringConfig Arn A unique Arn for CodeSigningConfig resource
- Dead
Letter Pulumi.Config Aws Native. Lambda. Inputs. Function Dead Letter Config A dead letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.
- Description string
A description of the function.
- Environment
Pulumi.
Aws Native. Lambda. Inputs. Function Environment Environment variables that are accessible from function code during execution.
- Ephemeral
Storage Pulumi.Aws Native. Lambda. Inputs. Function Ephemeral Storage A function's ephemeral storage settings.
- File
System List<Pulumi.Configs Aws Native. Lambda. Inputs. Function File System Config> Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function.
- Function
Name string The name of the Lambda function, up to 64 characters in length. If you don't specify a name, AWS CloudFormation generates one.
- Handler string
The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime
- Image
Config Pulumi.Aws Native. Lambda. Inputs. Function Image Config ImageConfig
- Kms
Key stringArn The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables. If it's not provided, AWS Lambda uses a default service key.
- Layers List<string>
A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
- Memory
Size int The amount of memory that your function has access to. Increasing the function's memory also increases its CPU allocation. The default value is 128 MB. The value must be a multiple of 64 MB.
- Package
Type Pulumi.Aws Native. Lambda. Function Package Type PackageType.
- Reserved
Concurrent intExecutions The number of simultaneous executions to reserve for the function.
- Runtime string
The identifier of the function's runtime.
- Runtime
Management Pulumi.Config Aws Native. Lambda. Inputs. Function Runtime Management Config RuntimeManagementConfig
- Snap
Start Pulumi.Aws Native. Lambda. Inputs. Function Snap Start The SnapStart setting of your function
- List<Pulumi.
Aws Native. Lambda. Inputs. Function Tag> A list of tags to apply to the function.
- Timeout int
The amount of time that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.
- Tracing
Config Pulumi.Aws Native. Lambda. Inputs. Function Tracing Config Set Mode to Active to sample and trace a subset of incoming requests with AWS X-Ray.
- Vpc
Config Pulumi.Aws Native. Lambda. Inputs. Function Vpc Config For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC.
- Code
Function
Code Args The code for the function.
- Role string
The Amazon Resource Name (ARN) of the function's execution role.
- Architectures
[]Function
Architectures Item - Code
Signing stringConfig Arn A unique Arn for CodeSigningConfig resource
- Dead
Letter FunctionConfig Dead Letter Config Args A dead letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.
- Description string
A description of the function.
- Environment
Function
Environment Args Environment variables that are accessible from function code during execution.
- Ephemeral
Storage FunctionEphemeral Storage Args A function's ephemeral storage settings.
- File
System []FunctionConfigs File System Config Args Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function.
- Function
Name string The name of the Lambda function, up to 64 characters in length. If you don't specify a name, AWS CloudFormation generates one.
- Handler string
The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime
- Image
Config FunctionImage Config Args ImageConfig
- Kms
Key stringArn The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables. If it's not provided, AWS Lambda uses a default service key.
- Layers []string
A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
- Memory
Size int The amount of memory that your function has access to. Increasing the function's memory also increases its CPU allocation. The default value is 128 MB. The value must be a multiple of 64 MB.
- Package
Type FunctionPackage Type PackageType.
- Reserved
Concurrent intExecutions The number of simultaneous executions to reserve for the function.
- Runtime string
The identifier of the function's runtime.
- Runtime
Management FunctionConfig Runtime Management Config Args RuntimeManagementConfig
- Snap
Start FunctionSnap Start Args The SnapStart setting of your function
- []Function
Tag Args A list of tags to apply to the function.
- Timeout int
The amount of time that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.
- Tracing
Config FunctionTracing Config Args Set Mode to Active to sample and trace a subset of incoming requests with AWS X-Ray.
- Vpc
Config FunctionVpc Config Args For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC.
- code
Function
Code The code for the function.
- role String
The Amazon Resource Name (ARN) of the function's execution role.
- architectures
List<Function
Architectures Item> - code
Signing StringConfig Arn A unique Arn for CodeSigningConfig resource
- dead
Letter FunctionConfig Dead Letter Config A dead letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.
- description String
A description of the function.
- environment
Function
Environment Environment variables that are accessible from function code during execution.
- ephemeral
Storage FunctionEphemeral Storage A function's ephemeral storage settings.
- file
System List<FunctionConfigs File System Config> Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function.
- function
Name String The name of the Lambda function, up to 64 characters in length. If you don't specify a name, AWS CloudFormation generates one.
- handler String
The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime
- image
Config FunctionImage Config ImageConfig
- kms
Key StringArn The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables. If it's not provided, AWS Lambda uses a default service key.
- layers List<String>
A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
- memory
Size Integer The amount of memory that your function has access to. Increasing the function's memory also increases its CPU allocation. The default value is 128 MB. The value must be a multiple of 64 MB.
- package
Type FunctionPackage Type PackageType.
- reserved
Concurrent IntegerExecutions The number of simultaneous executions to reserve for the function.
- runtime String
The identifier of the function's runtime.
- runtime
Management FunctionConfig Runtime Management Config RuntimeManagementConfig
- snap
Start FunctionSnap Start The SnapStart setting of your function
- List<Function
Tag> A list of tags to apply to the function.
- timeout Integer
The amount of time that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.
- tracing
Config FunctionTracing Config Set Mode to Active to sample and trace a subset of incoming requests with AWS X-Ray.
- vpc
Config FunctionVpc Config For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC.
- code
Function
Code The code for the function.
- role string
The Amazon Resource Name (ARN) of the function's execution role.
- architectures
Function
Architectures Item[] - code
Signing stringConfig Arn A unique Arn for CodeSigningConfig resource
- dead
Letter FunctionConfig Dead Letter Config A dead letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.
- description string
A description of the function.
- environment
Function
Environment Environment variables that are accessible from function code during execution.
- ephemeral
Storage FunctionEphemeral Storage A function's ephemeral storage settings.
- file
System FunctionConfigs File System Config[] Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function.
- function
Name string The name of the Lambda function, up to 64 characters in length. If you don't specify a name, AWS CloudFormation generates one.
- handler string
The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime
- image
Config FunctionImage Config ImageConfig
- kms
Key stringArn The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables. If it's not provided, AWS Lambda uses a default service key.
- layers string[]
A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
- memory
Size number The amount of memory that your function has access to. Increasing the function's memory also increases its CPU allocation. The default value is 128 MB. The value must be a multiple of 64 MB.
- package
Type FunctionPackage Type PackageType.
- reserved
Concurrent numberExecutions The number of simultaneous executions to reserve for the function.
- runtime string
The identifier of the function's runtime.
- runtime
Management FunctionConfig Runtime Management Config RuntimeManagementConfig
- snap
Start FunctionSnap Start The SnapStart setting of your function
- Function
Tag[] A list of tags to apply to the function.
- timeout number
The amount of time that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.
- tracing
Config FunctionTracing Config Set Mode to Active to sample and trace a subset of incoming requests with AWS X-Ray.
- vpc
Config FunctionVpc Config For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC.
- code
Function
Code Args The code for the function.
- role str
The Amazon Resource Name (ARN) of the function's execution role.
- architectures
Function
Architectures Item] - code_
signing_ strconfig_ arn A unique Arn for CodeSigningConfig resource
- dead_
letter_ Functionconfig Dead Letter Config Args A dead letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.
- description str
A description of the function.
- environment
Function
Environment Args Environment variables that are accessible from function code during execution.
- ephemeral_
storage FunctionEphemeral Storage Args A function's ephemeral storage settings.
- file_
system_ Functionconfigs File System Config Args] Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function.
- function_
name str The name of the Lambda function, up to 64 characters in length. If you don't specify a name, AWS CloudFormation generates one.
- handler str
The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime
- image_
config FunctionImage Config Args ImageConfig
- kms_
key_ strarn The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables. If it's not provided, AWS Lambda uses a default service key.
- layers Sequence[str]
A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
- memory_
size int The amount of memory that your function has access to. Increasing the function's memory also increases its CPU allocation. The default value is 128 MB. The value must be a multiple of 64 MB.
- package_
type FunctionPackage Type PackageType.
- reserved_
concurrent_ intexecutions The number of simultaneous executions to reserve for the function.
- runtime str
The identifier of the function's runtime.
- runtime_
management_ Functionconfig Runtime Management Config Args RuntimeManagementConfig
- snap_
start FunctionSnap Start Args The SnapStart setting of your function
- Function
Tag Args] A list of tags to apply to the function.
- timeout int
The amount of time that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.
- tracing_
config FunctionTracing Config Args Set Mode to Active to sample and trace a subset of incoming requests with AWS X-Ray.
- vpc_
config FunctionVpc Config Args For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC.
- code Property Map
The code for the function.
- role String
The Amazon Resource Name (ARN) of the function's execution role.
- architectures List<"x86_64" | "arm64">
- code
Signing StringConfig Arn A unique Arn for CodeSigningConfig resource
- dead
Letter Property MapConfig A dead letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.
- description String
A description of the function.
- environment Property Map
Environment variables that are accessible from function code during execution.
- ephemeral
Storage Property Map A function's ephemeral storage settings.
- file
System List<Property Map>Configs Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function.
- function
Name String The name of the Lambda function, up to 64 characters in length. If you don't specify a name, AWS CloudFormation generates one.
- handler String
The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime
- image
Config Property Map ImageConfig
- kms
Key StringArn The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables. If it's not provided, AWS Lambda uses a default service key.
- layers List<String>
A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
- memory
Size Number The amount of memory that your function has access to. Increasing the function's memory also increases its CPU allocation. The default value is 128 MB. The value must be a multiple of 64 MB.
- package
Type "Image" | "Zip" PackageType.
- reserved
Concurrent NumberExecutions The number of simultaneous executions to reserve for the function.
- runtime String
The identifier of the function's runtime.
- runtime
Management Property MapConfig RuntimeManagementConfig
- snap
Start Property Map The SnapStart setting of your function
- List<Property Map>
A list of tags to apply to the function.
- timeout Number
The amount of time that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.
- tracing
Config Property Map Set Mode to Active to sample and trace a subset of incoming requests with AWS X-Ray.
- vpc
Config Property Map For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC.
Outputs
All input properties are implicitly available as output properties. Additionally, the Function resource produces the following output properties:
- Arn string
Unique identifier for function resources
- Id string
The provider-assigned unique ID for this managed resource.
- Snap
Start Pulumi.Response Aws Native. Lambda. Outputs. Function Snap Start Response The SnapStart response of your function
- Arn string
Unique identifier for function resources
- Id string
The provider-assigned unique ID for this managed resource.
- Snap
Start FunctionResponse Snap Start Response The SnapStart response of your function
- arn String
Unique identifier for function resources
- id String
The provider-assigned unique ID for this managed resource.
- snap
Start FunctionResponse Snap Start Response The SnapStart response of your function
- arn string
Unique identifier for function resources
- id string
The provider-assigned unique ID for this managed resource.
- snap
Start FunctionResponse Snap Start Response The SnapStart response of your function
- arn str
Unique identifier for function resources
- id str
The provider-assigned unique ID for this managed resource.
- snap_
start_ Functionresponse Snap Start Response The SnapStart response of your function
- arn String
Unique identifier for function resources
- id String
The provider-assigned unique ID for this managed resource.
- snap
Start Property MapResponse The SnapStart response of your function
Supporting Types
FunctionArchitecturesItem, FunctionArchitecturesItemArgs
- X8664
- x86_64
- Arm64
- arm64
- Function
Architectures Item X8664 - x86_64
- Function
Architectures Item Arm64 - arm64
- X8664
- x86_64
- Arm64
- arm64
- X8664
- x86_64
- Arm64
- arm64
- X8664
- x86_64
- ARM64
- arm64
- "x86_64"
- x86_64
- "arm64"
- arm64
FunctionCode, FunctionCodeArgs
- Image
Uri string ImageUri.
- S3Bucket string
An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account.
- S3Key string
The Amazon S3 key of the deployment package.
- S3Object
Version string For versioned objects, the version of the deployment package object to use.
- Zip
File string The source code of your Lambda function. If you include your function source inline with this parameter, AWS CloudFormation places it in a file named index and zips it to create a deployment package..
- Image
Uri string ImageUri.
- S3Bucket string
An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account.
- S3Key string
The Amazon S3 key of the deployment package.
- S3Object
Version string For versioned objects, the version of the deployment package object to use.
- Zip
File string The source code of your Lambda function. If you include your function source inline with this parameter, AWS CloudFormation places it in a file named index and zips it to create a deployment package..
- image
Uri String ImageUri.
- s3Bucket String
An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account.
- s3Key String
The Amazon S3 key of the deployment package.
- s3Object
Version String For versioned objects, the version of the deployment package object to use.
- zip
File String The source code of your Lambda function. If you include your function source inline with this parameter, AWS CloudFormation places it in a file named index and zips it to create a deployment package..
- image
Uri string ImageUri.
- s3Bucket string
An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account.
- s3Key string
The Amazon S3 key of the deployment package.
- s3Object
Version string For versioned objects, the version of the deployment package object to use.
- zip
File string The source code of your Lambda function. If you include your function source inline with this parameter, AWS CloudFormation places it in a file named index and zips it to create a deployment package..
- image_
uri str ImageUri.
- s3_
bucket str An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account.
- s3_
key str The Amazon S3 key of the deployment package.
- s3_
object_ strversion For versioned objects, the version of the deployment package object to use.
- zip_
file str The source code of your Lambda function. If you include your function source inline with this parameter, AWS CloudFormation places it in a file named index and zips it to create a deployment package..
- image
Uri String ImageUri.
- s3Bucket String
An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account.
- s3Key String
The Amazon S3 key of the deployment package.
- s3Object
Version String For versioned objects, the version of the deployment package object to use.
- zip
File String The source code of your Lambda function. If you include your function source inline with this parameter, AWS CloudFormation places it in a file named index and zips it to create a deployment package..
FunctionDeadLetterConfig, FunctionDeadLetterConfigArgs
- Target
Arn string The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
- Target
Arn string The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
- target
Arn String The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
- target
Arn string The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
- target_
arn str The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
- target
Arn String The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
FunctionEnvironment, FunctionEnvironmentArgs
- Variables object
Environment variable key-value pairs.
- Variables interface{}
Environment variable key-value pairs.
- variables Object
Environment variable key-value pairs.
- variables any
Environment variable key-value pairs.
- variables Any
Environment variable key-value pairs.
- variables Any
Environment variable key-value pairs.
FunctionEphemeralStorage, FunctionEphemeralStorageArgs
- Size int
The amount of ephemeral storage that your function has access to.
- Size int
The amount of ephemeral storage that your function has access to.
- size Integer
The amount of ephemeral storage that your function has access to.
- size number
The amount of ephemeral storage that your function has access to.
- size int
The amount of ephemeral storage that your function has access to.
- size Number
The amount of ephemeral storage that your function has access to.
FunctionFileSystemConfig, FunctionFileSystemConfigArgs
- Arn string
The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.
- Local
Mount stringPath The path where the function can access the file system, starting with /mnt/.
- Arn string
The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.
- Local
Mount stringPath The path where the function can access the file system, starting with /mnt/.
- arn String
The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.
- local
Mount StringPath The path where the function can access the file system, starting with /mnt/.
- arn string
The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.
- local
Mount stringPath The path where the function can access the file system, starting with /mnt/.
- arn str
The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.
- local_
mount_ strpath The path where the function can access the file system, starting with /mnt/.
- arn String
The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.
- local
Mount StringPath The path where the function can access the file system, starting with /mnt/.
FunctionImageConfig, FunctionImageConfigArgs
- Command List<string>
Command.
- Entry
Point List<string> EntryPoint.
- Working
Directory string WorkingDirectory.
- Command []string
Command.
- Entry
Point []string EntryPoint.
- Working
Directory string WorkingDirectory.
- command List<String>
Command.
- entry
Point List<String> EntryPoint.
- working
Directory String WorkingDirectory.
- command string[]
Command.
- entry
Point string[] EntryPoint.
- working
Directory string WorkingDirectory.
- command Sequence[str]
Command.
- entry_
point Sequence[str] EntryPoint.
- working_
directory str WorkingDirectory.
- command List<String>
Command.
- entry
Point List<String> EntryPoint.
- working
Directory String WorkingDirectory.
FunctionPackageType, FunctionPackageTypeArgs
- Image
- Image
- Zip
- Zip
- Function
Package Type Image - Image
- Function
Package Type Zip - Zip
- Image
- Image
- Zip
- Zip
- Image
- Image
- Zip
- Zip
- IMAGE
- Image
- ZIP
- Zip
- "Image"
- Image
- "Zip"
- Zip
FunctionRuntimeManagementConfig, FunctionRuntimeManagementConfigArgs
- Update
Runtime Pulumi.On Aws Native. Lambda. Function Runtime Management Config Update Runtime On Trigger for runtime update
- Runtime
Version stringArn Unique identifier for a runtime version arn
- Update
Runtime FunctionOn Runtime Management Config Update Runtime On Trigger for runtime update
- Runtime
Version stringArn Unique identifier for a runtime version arn
- update
Runtime FunctionOn Runtime Management Config Update Runtime On Trigger for runtime update
- runtime
Version StringArn Unique identifier for a runtime version arn
- update
Runtime FunctionOn Runtime Management Config Update Runtime On Trigger for runtime update
- runtime
Version stringArn Unique identifier for a runtime version arn
- update_
runtime_ Functionon Runtime Management Config Update Runtime On Trigger for runtime update
- runtime_
version_ strarn Unique identifier for a runtime version arn
- update
Runtime "Auto" | "FunctionOn Update" | "Manual" Trigger for runtime update
- runtime
Version StringArn Unique identifier for a runtime version arn
FunctionRuntimeManagementConfigUpdateRuntimeOn, FunctionRuntimeManagementConfigUpdateRuntimeOnArgs
- Auto
- Auto
- Function
Update - FunctionUpdate
- Manual
- Manual
- Function
Runtime Management Config Update Runtime On Auto - Auto
- Function
Runtime Management Config Update Runtime On Function Update - FunctionUpdate
- Function
Runtime Management Config Update Runtime On Manual - Manual
- Auto
- Auto
- Function
Update - FunctionUpdate
- Manual
- Manual
- Auto
- Auto
- Function
Update - FunctionUpdate
- Manual
- Manual
- AUTO
- Auto
- FUNCTION_UPDATE
- FunctionUpdate
- MANUAL
- Manual
- "Auto"
- Auto
- "Function
Update" - FunctionUpdate
- "Manual"
- Manual
FunctionSnapStart, FunctionSnapStartArgs
- Apply
On Pulumi.Aws Native. Lambda. Function Snap Start Apply On Applying SnapStart setting on function resource type.
- Apply
On FunctionSnap Start Apply On Applying SnapStart setting on function resource type.
- apply
On FunctionSnap Start Apply On Applying SnapStart setting on function resource type.
- apply
On FunctionSnap Start Apply On Applying SnapStart setting on function resource type.
- apply_
on FunctionSnap Start Apply On Applying SnapStart setting on function resource type.
- apply
On "PublishedVersions" | "None" Applying SnapStart setting on function resource type.
FunctionSnapStartApplyOn, FunctionSnapStartApplyOnArgs
- Published
Versions - PublishedVersions
- None
- None
- Function
Snap Start Apply On Published Versions - PublishedVersions
- Function
Snap Start Apply On None - None
- Published
Versions - PublishedVersions
- None
- None
- Published
Versions - PublishedVersions
- None
- None
- PUBLISHED_VERSIONS
- PublishedVersions
- NONE
- None
- "Published
Versions" - PublishedVersions
- "None"
- None
FunctionSnapStartResponse, FunctionSnapStartResponseArgs
- Apply
On Pulumi.Aws Native. Lambda. Function Snap Start Response Apply On Applying SnapStart setting on function resource type.
- Optimization
Status Pulumi.Aws Native. Lambda. Function Snap Start Response Optimization Status Indicates whether SnapStart is activated for the specified function version.
- Apply
On FunctionSnap Start Response Apply On Applying SnapStart setting on function resource type.
- Optimization
Status FunctionSnap Start Response Optimization Status Indicates whether SnapStart is activated for the specified function version.
- apply
On FunctionSnap Start Response Apply On Applying SnapStart setting on function resource type.
- optimization
Status FunctionSnap Start Response Optimization Status Indicates whether SnapStart is activated for the specified function version.
- apply
On FunctionSnap Start Response Apply On Applying SnapStart setting on function resource type.
- optimization
Status FunctionSnap Start Response Optimization Status Indicates whether SnapStart is activated for the specified function version.
- apply_
on FunctionSnap Start Response Apply On Applying SnapStart setting on function resource type.
- optimization_
status FunctionSnap Start Response Optimization Status Indicates whether SnapStart is activated for the specified function version.
- apply
On "PublishedVersions" | "None" Applying SnapStart setting on function resource type.
- optimization
Status "On" | "Off" Indicates whether SnapStart is activated for the specified function version.
FunctionSnapStartResponseApplyOn, FunctionSnapStartResponseApplyOnArgs
- Published
Versions - PublishedVersions
- None
- None
- Function
Snap Start Response Apply On Published Versions - PublishedVersions
- Function
Snap Start Response Apply On None - None
- Published
Versions - PublishedVersions
- None
- None
- Published
Versions - PublishedVersions
- None
- None
- PUBLISHED_VERSIONS
- PublishedVersions
- NONE
- None
- "Published
Versions" - PublishedVersions
- "None"
- None
FunctionSnapStartResponseOptimizationStatus, FunctionSnapStartResponseOptimizationStatusArgs
- On
- On
- Off
- Off
- Function
Snap Start Response Optimization Status On - On
- Function
Snap Start Response Optimization Status Off - Off
- On
- On
- Off
- Off
- On
- On
- Off
- Off
- ON
- On
- OFF
- Off
- "On"
- On
- "Off"
- Off
FunctionTag, FunctionTagArgs
- Key string
The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
- Value string
The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
- Key string
The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
- Value string
The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
- key String
The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
- value String
The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
- key string
The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
- value string
The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
- key str
The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
- value str
The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
- key String
The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
- value String
The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
FunctionTracingConfig, FunctionTracingConfigArgs
- Mode
Pulumi.
Aws Native. Lambda. Function Tracing Config Mode The tracing mode.
- Mode
Function
Tracing Config Mode The tracing mode.
- mode
Function
Tracing Config Mode The tracing mode.
- mode
Function
Tracing Config Mode The tracing mode.
- mode
Function
Tracing Config Mode The tracing mode.
- mode
"Active" | "Pass
Through" The tracing mode.
FunctionTracingConfigMode, FunctionTracingConfigModeArgs
- Active
- Active
- Pass
Through - PassThrough
- Function
Tracing Config Mode Active - Active
- Function
Tracing Config Mode Pass Through - PassThrough
- Active
- Active
- Pass
Through - PassThrough
- Active
- Active
- Pass
Through - PassThrough
- ACTIVE
- Active
- PASS_THROUGH
- PassThrough
- "Active"
- Active
- "Pass
Through" - PassThrough
FunctionVpcConfig, FunctionVpcConfigArgs
- Security
Group List<string>Ids A list of VPC security groups IDs.
- Subnet
Ids List<string> A list of VPC subnet IDs.
- Security
Group []stringIds A list of VPC security groups IDs.
- Subnet
Ids []string A list of VPC subnet IDs.
- security
Group List<String>Ids A list of VPC security groups IDs.
- subnet
Ids List<String> A list of VPC subnet IDs.
- security
Group string[]Ids A list of VPC security groups IDs.
- subnet
Ids string[] A list of VPC subnet IDs.
- security_
group_ Sequence[str]ids A list of VPC security groups IDs.
- subnet_
ids Sequence[str] A list of VPC subnet IDs.
- security
Group List<String>Ids A list of VPC security groups IDs.
- subnet
Ids List<String> A list of VPC subnet IDs.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
AWS Native is in preview. AWS Classic is fully supported.