AwsLambdaFunctionArgs
interface AwsLambdaFunctionArgs extends Omit<aws.lambda.FunctionArgs, 'kmsKeyArn' | 'loggingConfig' | 'name' | 'role' | 'sourceKmsKeyArn' | 'tags'> {
architectures?: Input<Input<string>[] | undefined>;
capacityProviderConfig?: Input<FunctionCapacityProviderConfig | undefined>;
code?: Input<Archive | undefined>;
codePath?: string;
codeSha256?: Input<string | undefined>;
codeSigningConfigArn?: Input<string | undefined>;
deadLetterConfig?: Input<FunctionDeadLetterConfig | undefined>;
description?: Input<string | undefined>;
durableConfig?: Input<FunctionDurableConfig | undefined>;
encryption?: AwsLambdaFunctionEncryptionArgs;
environment?: Input<FunctionEnvironment | undefined>;
ephemeralStorage?: Input<FunctionEphemeralStorage | undefined>;
executionRole: AwsLambdaExecutionRoleInput;
fileSystemConfig?: Input<FunctionFileSystemConfig | undefined>;
functionName: string;
functionUrl?: AwsLambdaFunctionUrlArgs;
handler?: Input<string | undefined>;
imageConfig?: Input<FunctionImageConfig | undefined>;
imageUri?: Input<string | undefined>;
layers?: Input<Input<string>[] | undefined>;
logging?: AwsLambdaFunctionLoggingArgs;
memorySize?: Input<number | undefined>;
packageType?: Input<string | undefined>;
publish?: Input<boolean | undefined>;
publishTo?: Input<string | undefined>;
region?: Input<string | undefined>;
replacementSecurityGroupIds?: Input<Input<string>[] | undefined>;
replaceSecurityGroupsOnDestroy?: Input<boolean | undefined>;
reservedConcurrentExecutions?: Input<number | undefined>;
runtime?: Input<string | undefined>;
s3Bucket?: Input<string | undefined>;
s3Key?: Input<string | undefined>;
s3ObjectVersion?: Input<string | undefined>;
skipDestroy?: Input<boolean | undefined>;
snapStart?: Input<FunctionSnapStart | undefined>;
sourceCodeHash?: Input<string | undefined>;
tags?: Input<Record<string, Input<string>>>;
tenancyConfig?: Input<FunctionTenancyConfig | undefined>;
timeout?: Input<number | undefined>;
tracingConfig?: Input<FunctionTracingConfig | undefined>;
useResourceTimeoutForPropagation?: Input<boolean | undefined>;
vpcConfig?: Input<FunctionVpcConfig | undefined>;
}Input arguments for the Lambda function capability.
Remarks
This type extends aws.lambda.FunctionArgs with a higher-level execution-role input, explicit log-group reference wiring, default naming, and default tags.
Differences from the raw AWS provider resource:
- use
executionRoleinstead ofrole - use
functionNameinstead ofname - use
codePathas a convenience input for local archive/directory paths - use
logging.logGroupto pass an explicit CloudWatch log-group reference - use
logginginstead ofloggingConfig
Exactly one deployment source must be provided: code, codePath, imageUri, or s3Bucket.
Example
const args: AwsLambdaFunctionArgs = {
functionName: 'apiHandler',
executionRole: lambdaRole.arn,
codePath: './dist/function',
handler: 'index.handler',
runtime: aws.lambda.Runtime.NodeJS22dX,
logging: {
logGroup: applicationLogGroup,
logFormat: 'JSON',
applicationLogLevel: 'INFO',
systemLogLevel: 'WARN',
},
};Hierarchy
FunctionArgs, "kmsKeyArn" | "loggingConfig" | "name" | "role" | "sourceKmsKeyArn" | "tags">AwsLambdaFunctionArgs
Properties
architectures: Input<Input<string>[] | undefined>
Inherited from architectures
Instruction set architecture for your Lambda function. Valid values are ["x8664"] and ["arm64"]. Default is ["x8664"]. Removing this attribute, function's architecture stays the same.
capacityProviderConfig: Input<FunctionCapacityProviderConfig | undefined>
Inherited from capacityProviderConfig
Configuration block for Lambda Capacity Provider. See below.
code: Input<Archive | undefined>
Inherited from code
Path to the function's deployment package within the local filesystem. Conflicts with imageUri and s3Bucket. One of filename, imageUri, or s3Bucket must be specified.
codePath: string
Optional local archive/directory path to package as Lambda code (FileArchive).
codeSha256: Input<string | undefined>
Inherited from codeSha256
Base64-encoded representation the source code package file. Use this argument to trigger updates when the function source code changes. For OCI, this value is relayed directly from the image digest. For zip files, this value is the Base64 encoded SHA-256 hash of the .zip file. Layers are not included in the calculation. To trigger updates using a non-standard hashing algorithm, use the sourceCodeHash argument instead.
codeSigningConfigArn: Input<string | undefined>
Inherited from codeSigningConfigArn
ARN of a code-signing configuration to enable code signing for this function.
deadLetterConfig: Input<FunctionDeadLetterConfig | undefined>
Inherited from deadLetterConfig
Configuration block for dead letter queue. See below.
description: Input<string | undefined>
Inherited from description
Description of what your Lambda Function does.
durableConfig: Input<FunctionDurableConfig | undefined>
Inherited from durableConfig
Configuration block for durable function settings. See below. durableConfig may only be available in limited regions, including us-east-2.
encryption: AwsLambdaFunctionEncryptionArgs
Optional KMS encryption settings.
environment: Input<FunctionEnvironment | undefined>
Inherited from environment
Configuration block for environment variables. See below.
ephemeralStorage: Input<FunctionEphemeralStorage | undefined>
Inherited from ephemeralStorage
Amount of ephemeral storage (/tmp) to allocate for the Lambda Function. See below.
executionRole: AwsLambdaExecutionRoleInput
Execution role ARN input or structural reference exposing arn.
fileSystemConfig: Input<FunctionFileSystemConfig | undefined>
Inherited from fileSystemConfig
Configuration block for EFS or S3 Files file system. See below.
functionName: string
Required Lambda function purpose name.
Remarks
This value is the Pulumi logical-identity source and must be provided as a synchronous plain string.
functionUrl: AwsLambdaFunctionUrlArgs
Optional Function URL configuration.
handler: Input<string | undefined>
Inherited from handler
Function entry point in your code. Required if packageType is Zip.
imageConfig: Input<FunctionImageConfig | undefined>
Inherited from imageConfig
Container image configuration values. See below.
imageUri: Input<string | undefined>
Inherited from imageUri
ECR image URI containing the function's deployment package. Conflicts with filename and s3Bucket. One of filename, imageUri, or s3Bucket must be specified.
layers: Input<Input<string>[] | undefined>
Inherited from layers
List of Lambda Layer Version ARNs (maximum of 5) to attach to your Lambda Function.
logging: AwsLambdaFunctionLoggingArgs
Optional advanced logging configuration including log-group destination.
memorySize: Input<number | undefined>
Inherited from memorySize
Amount of memory in MB your Lambda Function can use at runtime. Valid value between 128 MB to 32,768 MB (32 GB), in 1 MB increments. Defaults to 128.
packageType: Input<string | undefined>
Inherited from packageType
Lambda deployment package type. Valid values are Zip and Image. Defaults to Zip.
publish: Input<boolean | undefined>
Inherited from publish
Whether to publish creation/change as new Lambda Function Version. Defaults to false.
publishTo: Input<string | undefined>
Inherited from publishTo
Whether to publish to a alias or version number. Omit for regular version publishing. Option is LATEST_PUBLISHED.
region: Input<string | undefined>
Inherited from region
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
replacementSecurityGroupIds: Input<Input<string>[] | undefined>
Inherited from replacementSecurityGroupIds
List of security group IDs to assign to the function's VPC configuration prior to destruction. Required if replaceSecurityGroupsOnDestroy is true.
replaceSecurityGroupsOnDestroy: Input<boolean | undefined>
Inherited from replaceSecurityGroupsOnDestroy
Whether to replace the security groups on the function's VPC configuration prior to destruction. Default is false.
reservedConcurrentExecutions: Input<number | undefined>
Inherited from reservedConcurrentExecutions
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.
runtime: Input<string | undefined>
Inherited from runtime
Identifier of the function's runtime. Required if packageType is Zip. See Runtimes for valid values.
s3Bucket: Input<string | undefined>
Inherited from s3Bucket
S3 bucket location containing the function's deployment package. Conflicts with filename and imageUri. One of filename, imageUri, or s3Bucket must be specified.
s3Key: Input<string | undefined>
Inherited from s3Key
S3 key of an object containing the function's deployment package. Required if s3Bucket is set.
s3ObjectVersion: Input<string | undefined>
Inherited from s3ObjectVersion
Object version containing the function's deployment package. Conflicts with filename and imageUri.
skipDestroy: Input<boolean | undefined>
Inherited from skipDestroy
Whether to retain the old version of a previously deployed Lambda Layer. Default is false.
snapStart: Input<FunctionSnapStart | undefined>
Inherited from snapStart
Configuration block for snap start settings. See below.
sourceCodeHash: Input<string | undefined>
Inherited from sourceCodeHash
User-defined hash of the source code package file. Use this argument to trigger updates when the local function source code changes. This is a synthetic argument tracked only by the AWS provider and does not need to match the hashing algorithm used by Lambda to compute the CodeSha256 response value. Out-of-band changes to the source code will not be captured by this argument. To include out-of-band source code changes as an update trigger, use the codeSha256 argument instead.
tags: Input<Record<string, Input<string>>>
Additional tags merged with default project/environment tags.
tenancyConfig: Input<FunctionTenancyConfig | undefined>
Inherited from tenancyConfig
Configuration block for Tenancy. See below.
timeout: Input<number | undefined>
Inherited from timeout
Amount of time your Lambda Function has to run in seconds. Defaults to 3. Valid between 1 and 900.
tracingConfig: Input<FunctionTracingConfig | undefined>
Inherited from tracingConfig
Configuration block for X-Ray tracing. See below.
useResourceTimeoutForPropagation: Input<boolean | undefined>
Inherited from useResourceTimeoutForPropagation
Whether to apply resource level timeout values while retrying eventually consistent API operations. By default the provider uses a 5 minute timeout to allow for propagation in the Lambda service. When set to true, this default value is replaced with the configurable resource timeouts. Increased timeout values may be useful in highly active accounts, or regions where propagation delays are inconsistent.
vpcConfig: Input<FunctionVpcConfig | undefined>
Inherited from vpcConfig
Configuration block for VPC. See below.