lambda

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-aws repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-aws repo.

class pulumi_aws.lambda_.Alias(resource_name, opts=None, description=None, function_name=None, function_version=None, name=None, routing_config=None, __props__=None, __name__=None, __opts__=None)

Creates a Lambda function alias. Creates an alias that points to the specified Lambda function version.

For information about Lambda and how to use it, see [What is AWS Lambda?][1] For information about function aliases, see [CreateAlias][2] and [AliasRoutingConfiguration][3] in the API docs.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – Description of the alias.

  • function_name (pulumi.Input[str]) – The function ARN of the Lambda function for which you want to create an alias.

  • function*version (pulumi.Input[str]) –

    Lambda function version for which you are creating the alias. Pattern: (\$LATEST|[0-9]+).

  • name (pulumi.Input[str]) – Name for the alias you are creating. Pattern: (?!^[0-9]+$)([a-zA-Z0-9-*]+)

  • routing_config (pulumi.Input[dict]) – The Lambda alias’ route configuration settings. Fields documented below

The routing_config object supports the following:

  • additionalVersionWeights (pulumi.Input[dict]) - A map that defines the proportion of events that should be sent to different versions of a lambda function.

arn = None

The Amazon Resource Name (ARN) identifying your Lambda function alias.

description = None

Description of the alias.

function_name = None

The function ARN of the Lambda function for which you want to create an alias.

function_version = None

Lambda function version for which you are creating the alias. Pattern: (\$LATEST|[0-9]+).

invoke_arn = None

The ARN to be used for invoking Lambda Function from API Gateway - to be used in ``apigateway.Integration` <https://www.terraform.io/docs/providers/aws/r/api_gateway_integration.html>`_’s uri

name = None

Name for the alias you are creating. Pattern: (?!^[0-9]+$)([a-zA-Z0-9-_]+)

routing_config = None

The Lambda alias’ route configuration settings. Fields documented below

  • additionalVersionWeights (dict) - A map that defines the proportion of events that should be sent to different versions of a lambda function.

static get(resource_name, id, opts=None, arn=None, description=None, function_name=None, function_version=None, invoke_arn=None, name=None, routing_config=None)

Get an existing Alias resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) identifying your Lambda function alias.

  • description (pulumi.Input[str]) – Description of the alias.

  • function_name (pulumi.Input[str]) – The function ARN of the Lambda function for which you want to create an alias.

  • function_version (pulumi.Input[str]) – Lambda function version for which you are creating the alias. Pattern: (\$LATEST|[0-9]+).

  • invoke_arn (pulumi.Input[str]) – The ARN to be used for invoking Lambda Function from API Gateway - to be used in ``apigateway.Integration` <https://www.terraform.io/docs/providers/aws/r/api_gateway_integration.html>`_’s uri

  • name (pulumi.Input[str]) – Name for the alias you are creating. Pattern: (?!^[0-9]+$)([a-zA-Z0-9-_]+)

  • routing_config (pulumi.Input[dict]) – The Lambda alias’ route configuration settings. Fields documented below

The routing_config object supports the following:

  • additionalVersionWeights (pulumi.Input[dict]) - A map that defines the proportion of events that should be sent to different versions of a lambda function.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.lambda_.AwaitableGetFunctionResult(arn=None, dead_letter_config=None, description=None, environment=None, function_name=None, handler=None, invoke_arn=None, kms_key_arn=None, last_modified=None, layers=None, memory_size=None, qualified_arn=None, qualifier=None, reserved_concurrent_executions=None, role=None, runtime=None, source_code_hash=None, source_code_size=None, tags=None, timeout=None, tracing_config=None, version=None, vpc_config=None, id=None)
class pulumi_aws.lambda_.AwaitableGetInvocationResult(function_name=None, input=None, qualifier=None, result=None, result_map=None, id=None)
class pulumi_aws.lambda_.AwaitableGetLayerVersionResult(arn=None, compatible_runtime=None, compatible_runtimes=None, created_date=None, description=None, layer_arn=None, layer_name=None, license_info=None, source_code_hash=None, source_code_size=None, version=None, id=None)
class pulumi_aws.lambda_.EventSourceMapping(resource_name, opts=None, batch_size=None, enabled=None, event_source_arn=None, function_name=None, maximum_batching_window_in_seconds=None, starting_position=None, starting_position_timestamp=None, __props__=None, __name__=None, __opts__=None)

Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis, DynamoDB and SQS.

For information about Lambda and how to use it, see [What is AWS Lambda?][1]. For information about event source mappings, see [CreateEventSourceMapping][2] in the API docs.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • batch_size (pulumi.Input[float]) – The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to 100 for DynamoDB and Kinesis, 10 for SQS.

  • enabled (pulumi.Input[bool]) – Determines if the mapping will be enabled on creation. Defaults to true.

  • event_source_arn (pulumi.Input[str]) – The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.

  • function_name (pulumi.Input[str]) – The name or the ARN of the Lambda function that will be subscribing to events.

  • maximum_batching_window_in_seconds (pulumi.Input[float]) – The maximum amount of time to gather records before invoking the function, in seconds. Records will continue to buffer until either maximum_batching_window_in_seconds expires or batch_size has been met. Defaults to as soon as records are available in the stream. If the batch it reads from the stream only has one record in it, Lambda only sends one record to the function.

  • starting_position (pulumi.Input[str]) – The position in the stream where AWS Lambda should start reading. Must be one of AT_TIMESTAMP (Kinesis only), LATEST or TRIM_HORIZON if getting events from Kinesis or DynamoDB. Must not be provided if getting events from SQS. More information about these positions can be found in the AWS DynamoDB Streams API Reference and AWS Kinesis API Reference.

  • starting_position_timestamp (pulumi.Input[str]) – A timestamp in RFC3339 format of the data record which to start reading when using starting_position set to AT_TIMESTAMP. If a record with this exact timestamp does not exist, the next later record is chosen. If the timestamp is older than the current trim horizon, the oldest available record is chosen.

batch_size = None

The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to 100 for DynamoDB and Kinesis, 10 for SQS.

enabled = None

Determines if the mapping will be enabled on creation. Defaults to true.

event_source_arn = None

The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.

function_arn = None

The the ARN of the Lambda function the event source mapping is sending events to. (Note: this is a computed value that differs from function_name above.)

function_name = None

The name or the ARN of the Lambda function that will be subscribing to events.

last_modified = None

The date this resource was last modified.

last_processing_result = None

The result of the last AWS Lambda invocation of your Lambda function.

maximum_batching_window_in_seconds = None

The maximum amount of time to gather records before invoking the function, in seconds. Records will continue to buffer until either maximum_batching_window_in_seconds expires or batch_size has been met. Defaults to as soon as records are available in the stream. If the batch it reads from the stream only has one record in it, Lambda only sends one record to the function.

starting_position = None

The position in the stream where AWS Lambda should start reading. Must be one of AT_TIMESTAMP (Kinesis only), LATEST or TRIM_HORIZON if getting events from Kinesis or DynamoDB. Must not be provided if getting events from SQS. More information about these positions can be found in the AWS DynamoDB Streams API Reference and AWS Kinesis API Reference.

starting_position_timestamp = None

A timestamp in RFC3339 format of the data record which to start reading when using starting_position set to AT_TIMESTAMP. If a record with this exact timestamp does not exist, the next later record is chosen. If the timestamp is older than the current trim horizon, the oldest available record is chosen.

state = None

The state of the event source mapping.

state_transition_reason = None

The reason the event source mapping is in its current state.

uuid = None

The UUID of the created event source mapping.

static get(resource_name, id, opts=None, batch_size=None, enabled=None, event_source_arn=None, function_arn=None, function_name=None, last_modified=None, last_processing_result=None, maximum_batching_window_in_seconds=None, starting_position=None, starting_position_timestamp=None, state=None, state_transition_reason=None, uuid=None)

Get an existing EventSourceMapping resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • batch_size (pulumi.Input[float]) – The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to 100 for DynamoDB and Kinesis, 10 for SQS.

  • enabled (pulumi.Input[bool]) – Determines if the mapping will be enabled on creation. Defaults to true.

  • event_source_arn (pulumi.Input[str]) – The event source ARN - can be a Kinesis stream, DynamoDB stream, or SQS queue.

  • function_arn (pulumi.Input[str]) – The the ARN of the Lambda function the event source mapping is sending events to. (Note: this is a computed value that differs from function_name above.)

  • function_name (pulumi.Input[str]) – The name or the ARN of the Lambda function that will be subscribing to events.

  • last_modified (pulumi.Input[str]) – The date this resource was last modified.

  • last_processing_result (pulumi.Input[str]) – The result of the last AWS Lambda invocation of your Lambda function.

  • maximum_batching_window_in_seconds (pulumi.Input[float]) – The maximum amount of time to gather records before invoking the function, in seconds. Records will continue to buffer until either maximum_batching_window_in_seconds expires or batch_size has been met. Defaults to as soon as records are available in the stream. If the batch it reads from the stream only has one record in it, Lambda only sends one record to the function.

  • starting_position (pulumi.Input[str]) –

    The position in the stream where AWS Lambda should start reading. Must be one of AT_TIMESTAMP (Kinesis only), LATEST or TRIM_HORIZON if getting events from Kinesis or DynamoDB. Must not be provided if getting events from SQS. More information about these positions can be found in the AWS DynamoDB Streams API Reference and AWS Kinesis API Reference.

  • starting_position_timestamp (pulumi.Input[str]) –

    A timestamp in RFC3339 format of the data record which to start reading when using starting_position set to AT_TIMESTAMP. If a record with this exact timestamp does not exist, the next later record is chosen. If the timestamp is older than the current trim horizon, the oldest available record is chosen.

  • state (pulumi.Input[str]) – The state of the event source mapping.

  • state_transition_reason (pulumi.Input[str]) – The reason the event source mapping is in its current state.

  • uuid (pulumi.Input[str]) – The UUID of the created event source mapping.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.lambda_.Function(resource_name, opts=None, dead_letter_config=None, description=None, environment=None, code=None, name=None, handler=None, kms_key_arn=None, layers=None, memory_size=None, publish=None, reserved_concurrent_executions=None, role=None, runtime=None, s3_bucket=None, s3_key=None, s3_object_version=None, source_code_hash=None, tags=None, timeout=None, tracing_config=None, vpc_config=None, __props__=None, __name__=None, __opts__=None)

Create a Function resource with the given unique name, props, and options.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • dead_letter*config (pulumi.Input[dict]) –

    Nested block to configure the function’s dead letter queue. See details below.

  • description (pulumi.Input[str]) – Description of what your Lambda Function does.

  • environment (pulumi.Input[dict]) – The Lambda environment’s configuration settings. Fields documented below.

  • code (pulumi.Input[pulumi.Archive]) – The path to the function’s deployment package within the local filesystem. If defined, The s3*`-prefixed options cannot be used.

  • name (pulumi.Input[str]) – A unique name for your Lambda Function.

  • handler (pulumi.Input[str]) – The function [entrypoint][3] in your code.

  • kms_key_arn (pulumi.Input[str]) – The ARN for the KMS encryption key.

  • layers (pulumi.Input[list]) – List of Lambda Layer Version ARNs (maximum of 5) to attach to your Lambda Function. See [Lambda Layers][10]

  • memory_size (pulumi.Input[float]) – Amount of memory in MB your Lambda Function can use at runtime. Defaults to``128``. See [Limits][5]

  • publish (pulumi.Input[bool]) – Whether to publish creation/change as new Lambda Function Version. Defaults to``false``.

  • reserved_concurrent_executions (pulumi.Input[float]) – The amount of reserved concurrent executions for this lambda function. A value of``0disables lambda from being triggered and-1removes any concurrency limitations. Defaults to Unreserved Concurrency Limits-1``. See [Managing Concurrency][9]

  • role (pulumi.Input[str]) – IAM role attached to the Lambda Function. This governs both who / what can invoke your Lambda Function, as well as what resources our Lambda Function has access to. See [Lambda Permission Model][4] for more details.

  • runtime (pulumi.Input[str]) – See [Runtimes][6] for valid values.

  • s3_bucket (pulumi.Input[str]) – The S3 bucket location containing the function’s deployment package. Conflicts with``filename``. This bucket must reside in the same AWS region where you are creating the Lambda function.

  • s3_key (pulumi.Input[str]) – The S3 key of an object containing the function’s deployment package. Conflicts with``filename``.

  • s3_object_version (pulumi.Input[str]) – The object version containing the function’s deployment package. Conflicts with``filename``.

  • source_code_hash (pulumi.Input[str]) – Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either``filenameors3_key. The usual way to set this isfilebase64sha256(“file.zip”)(this provider 0.11.12 and later) orbase64sha256(file(“file.zip”))``(this provider 0.11.11 and earlier), where “file.zip” is the local filename of the lambda function source archive.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the object.

  • timeout (pulumi.Input[float]) – The amount of time your Lambda Function has to run in seconds. Defaults to``3`. See [Limits][5]

  • vpc_config (pulumi.Input[dict]) – Provide this to allow your function to access your VPC. Fields documented below. See [Lambda in VPC][7]

The dead_letter_config object supports the following:

  • target_arn (pulumi.Input[str]) - The ARN of an SNS topic or SQS queue to notify when an invocation fails. If this option is used, the function’s IAM role must be granted suitable access to write to the target object, which means allowing either the sns:Publish or sqs:SendMessage action on this ARN, depending on which service is targeted.

The environment object supports the following:

  • variables (pulumi.Input[dict]) - A map that defines environment variables for the Lambda function.

The tracing_config object supports the following:

  • mode (pulumi.Input[str]) - Can be either PassThrough or Active. If PassThrough, Lambda will only trace the request from an upstream service if it contains a tracing header with “sampled=1”. If Active, Lambda will respect any tracing header it receives from an upstream service. If no tracing header is received, Lambda will call X-Ray for a tracing decision.

The vpc_config object supports the following:

  • security_group_ids (pulumi.Input[list]) - A list of security group IDs associated with the Lambda function.

  • subnet_ids (pulumi.Input[list]) - A list of subnet IDs associated with the Lambda function.

  • vpc_id (pulumi.Input[str])

arn = None

The Amazon Resource Name (ARN) identifying your Lambda Function.

dead_letter_config = None

Nested block to configure the function’s dead letter queue. See details below.

  • target_arn (str) - The ARN of an SNS topic or SQS queue to notify when an invocation fails. If this option is used, the function’s IAM role must be granted suitable access to write to the target object, which means allowing either the sns:Publish or sqs:SendMessage action on this ARN, depending on which service is targeted.

description = None

Description of what your Lambda Function does.

environment = None

The Lambda environment’s configuration settings. Fields documented below.

  • variables (dict) - A map that defines environment variables for the Lambda function.

code = None

The path to the function’s deployment package within the local filesystem. If defined, The s3_-prefixed options cannot be used.

name = None

A unique name for your Lambda Function.

handler = None

The function [entrypoint][3] in your code.

invoke_arn = None

The ARN to be used for invoking Lambda Function from API Gateway - to be used in ``apigateway.Integration` <https://www.terraform.io/docs/providers/aws/r/api_gateway_integration.html>`_’s uri

kms_key_arn = None

The ARN for the KMS encryption key.

last_modified = None

The date this resource was last modified.

layers = None

List of Lambda Layer Version ARNs (maximum of 5) to attach to your Lambda Function. See [Lambda Layers][10]

memory_size = None

Amount of memory in MB your Lambda Function can use at runtime. Defaults to 128. See [Limits][5]

publish = None

Whether to publish creation/change as new Lambda Function Version. Defaults to false.

qualified_arn = None

The Amazon Resource Name (ARN) identifying your Lambda Function Version (if versioning is enabled via publish = true).

reserved_concurrent_executions = None

The 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][9]

role = None

IAM role attached to the Lambda Function. This governs both who / what can invoke your Lambda Function, as well as what resources our Lambda Function has access to. See [Lambda Permission Model][4] for more details.

runtime = None

See [Runtimes][6] for valid values.

s3_bucket = None

The S3 bucket location containing the function’s deployment package. Conflicts with filename. This bucket must reside in the same AWS region where you are creating the Lambda function.

s3_key = None

The S3 key of an object containing the function’s deployment package. Conflicts with filename.

s3_object_version = None

The object version containing the function’s deployment package. Conflicts with filename.

source_code_hash = None

Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key. The usual way to set this is filebase64sha256("file.zip") (this provider 0.11.12 and later) or base64sha256(file("file.zip")) (this provider 0.11.11 and earlier), where “file.zip” is the local filename of the lambda function source archive.

source_code_size = None

The size in bytes of the function .zip file.

tags = None

A mapping of tags to assign to the object.

timeout = None

The amount of time your Lambda Function has to run in seconds. Defaults to 3. See [Limits][5]

version = None

Latest published version of your Lambda Function.

vpc_config = None

Provide this to allow your function to access your VPC. Fields documented below. See [Lambda in VPC][7]

  • security_group_ids (list) - A list of security group IDs associated with the Lambda function.

  • subnet_ids (list) - A list of subnet IDs associated with the Lambda function.

  • vpc_id (str)

static get(resource_name, id, opts=None, arn=None, dead_letter_config=None, description=None, environment=None, code=None, name=None, handler=None, invoke_arn=None, kms_key_arn=None, last_modified=None, layers=None, memory_size=None, publish=None, qualified_arn=None, reserved_concurrent_executions=None, role=None, runtime=None, s3_bucket=None, s3_key=None, s3_object_version=None, source_code_hash=None, source_code_size=None, tags=None, timeout=None, tracing_config=None, version=None, vpc_config=None)

Get an existing Function resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) identifying your Lambda Function.

  • dead_letter*config (pulumi.Input[dict]) –

    Nested block to configure the function’s dead letter queue. See details below.

  • description (pulumi.Input[str]) – Description of what your Lambda Function does.

  • environment (pulumi.Input[dict]) – The Lambda environment’s configuration settings. Fields documented below.

  • code (pulumi.Input[pulumi.Archive]) – The path to the function’s deployment package within the local filesystem. If defined, The s3*`-prefixed options cannot be used.

  • name (pulumi.Input[str]) – A unique name for your Lambda Function.

  • handler (pulumi.Input[str]) – The function [entrypoint][3] in your code.

  • invoke_arn (pulumi.Input[str]) – The ARN to be used for invoking Lambda Function from API Gateway - to be used in [\ apigateway.Integration\ ``](https://www.terraform.io/docs/providers/aws/r/api_gateway_integration.html)'suri``:param pulumi.Input[str] kms_key_arn: The ARN for the KMS encryption key.

  • last_modified (pulumi.Input[str]) – The date this resource was last modified.

  • layers (pulumi.Input[list]) – List of Lambda Layer Version ARNs (maximum of 5) to attach to your Lambda Function. See [Lambda Layers][10]

  • memory_size (pulumi.Input[float]) – Amount of memory in MB your Lambda Function can use at runtime. Defaults to``128``. See [Limits][5]

  • publish (pulumi.Input[bool]) – Whether to publish creation/change as new Lambda Function Version. Defaults to``false``.

  • qualified_arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) identifying your Lambda Function Version (if versioning is enabled via``publish = true``).

  • reserved_concurrent_executions (pulumi.Input[float]) – The amount of reserved concurrent executions for this lambda function. A value of``0disables lambda from being triggered and-1removes any concurrency limitations. Defaults to Unreserved Concurrency Limits-1``. See [Managing Concurrency][9]

  • role (pulumi.Input[str]) – IAM role attached to the Lambda Function. This governs both who / what can invoke your Lambda Function, as well as what resources our Lambda Function has access to. See [Lambda Permission Model][4] for more details.

  • runtime (pulumi.Input[str]) – See [Runtimes][6] for valid values.

  • s3_bucket (pulumi.Input[str]) – The S3 bucket location containing the function’s deployment package. Conflicts with``filename``. This bucket must reside in the same AWS region where you are creating the Lambda function.

  • s3_key (pulumi.Input[str]) – The S3 key of an object containing the function’s deployment package. Conflicts with``filename``.

  • s3_object_version (pulumi.Input[str]) – The object version containing the function’s deployment package. Conflicts with``filename``.

  • source_code_hash (pulumi.Input[str]) – Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either``filenameors3_key. The usual way to set this isfilebase64sha256(“file.zip”)(this provider 0.11.12 and later) orbase64sha256(file(“file.zip”))``(this provider 0.11.11 and earlier), where “file.zip” is the local filename of the lambda function source archive.

  • source_code_size (pulumi.Input[float]) – The size in bytes of the function .zip file.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the object.

  • timeout (pulumi.Input[float]) – The amount of time your Lambda Function has to run in seconds. Defaults to``3`. See [Limits][5]

  • version (pulumi.Input[str]) – Latest published version of your Lambda Function.

  • vpc_config (pulumi.Input[dict]) – Provide this to allow your function to access your VPC. Fields documented below. See [Lambda in VPC][7]

The dead_letter_config object supports the following:

  • target_arn (pulumi.Input[str]) - The ARN of an SNS topic or SQS queue to notify when an invocation fails. If this option is used, the function’s IAM role must be granted suitable access to write to the target object, which means allowing either the sns:Publish or sqs:SendMessage action on this ARN, depending on which service is targeted.

The environment object supports the following:

  • variables (pulumi.Input[dict]) - A map that defines environment variables for the Lambda function.

The tracing_config object supports the following:

  • mode (pulumi.Input[str]) - Can be either PassThrough or Active. If PassThrough, Lambda will only trace the request from an upstream service if it contains a tracing header with “sampled=1”. If Active, Lambda will respect any tracing header it receives from an upstream service. If no tracing header is received, Lambda will call X-Ray for a tracing decision.

The vpc_config object supports the following:

  • security_group_ids (pulumi.Input[list]) - A list of security group IDs associated with the Lambda function.

  • subnet_ids (pulumi.Input[list]) - A list of subnet IDs associated with the Lambda function.

  • vpc_id (pulumi.Input[str])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.lambda_.GetFunctionResult(arn=None, dead_letter_config=None, description=None, environment=None, function_name=None, handler=None, invoke_arn=None, kms_key_arn=None, last_modified=None, layers=None, memory_size=None, qualified_arn=None, qualifier=None, reserved_concurrent_executions=None, role=None, runtime=None, source_code_hash=None, source_code_size=None, tags=None, timeout=None, tracing_config=None, version=None, vpc_config=None, id=None)

A collection of values returned by getFunction.

arn = None

Unqualified (no :QUALIFIER or :VERSION suffix) Amazon Resource Name (ARN) identifying your Lambda Function. See also qualified_arn.

dead_letter_config = None

Configure the function’s dead letter queue.

description = None

Description of what your Lambda Function does.

environment = None

The Lambda environment’s configuration settings.

handler = None

The function entrypoint in your code.

invoke_arn = None

The ARN to be used for invoking Lambda Function from API Gateway.

kms_key_arn = None

The ARN for the KMS encryption key.

last_modified = None

The date this resource was last modified.

layers = None

A list of Lambda Layer ARNs attached to your Lambda Function.

memory_size = None

Amount of memory in MB your Lambda Function can use at runtime.

qualified_arn = None

Qualified (:QUALIFIER or :VERSION suffix) Amazon Resource Name (ARN) identifying your Lambda Function. See also arn.

reserved_concurrent_executions = None

The amount of reserved concurrent executions for this lambda function or -1 if unreserved.

role = None

IAM role attached to the Lambda Function.

runtime = None

The runtime environment for the Lambda function..

source_code_hash = None

Base64-encoded representation of raw SHA-256 sum of the zip file.

source_code_size = None

The size in bytes of the function .zip file.

timeout = None

The function execution time at which Lambda should terminate the function.

tracing_config = None

Tracing settings of the function.

version = None

The version of the Lambda function.

vpc_config = None

VPC configuration associated with your Lambda function.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_aws.lambda_.GetInvocationResult(function_name=None, input=None, qualifier=None, result=None, result_map=None, id=None)

A collection of values returned by getInvocation.

result = None

String result of the lambda function invocation.

result_map = None

This field is set only if result is a map of primitive types, where the map is string keys and string values.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_aws.lambda_.GetLayerVersionResult(arn=None, compatible_runtime=None, compatible_runtimes=None, created_date=None, description=None, layer_arn=None, layer_name=None, license_info=None, source_code_hash=None, source_code_size=None, version=None, id=None)

A collection of values returned by getLayerVersion.

arn = None

The Amazon Resource Name (ARN) of the Lambda Layer with version.

compatible_runtimes = None

A list of [Runtimes][1] the specific Lambda Layer version is compatible with.

created_date = None

The date this resource was created.

description = None

Description of the specific Lambda Layer version.

layer_arn = None

The Amazon Resource Name (ARN) of the Lambda Layer without version.

license_info = None

License info associated with the specific Lambda Layer version.

source_code_hash = None

Base64-encoded representation of raw SHA-256 sum of the zip file.

source_code_size = None

The size in bytes of the function .zip file.

version = None

This Lamba Layer version.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_aws.lambda_.LayerVersion(resource_name, opts=None, compatible_runtimes=None, description=None, code=None, layer_name=None, license_info=None, s3_bucket=None, s3_key=None, s3_object_version=None, source_code_hash=None, __props__=None, __name__=None, __opts__=None)

Provides a Lambda Layer Version resource. Lambda Layers allow you to reuse shared bits of code across multiple lambda functions.

For information about Lambda Layers and how to use them, see [AWS Lambda Layers][1]

AWS Lambda Layers expect source code to be provided as a deployment package whose structure varies depending on which compatible_runtimes this layer specifies. See [Runtimes][2] for the valid values of compatible_runtimes.

Once you have created your deployment package you can specify it either directly as a local file (using the filename argument) or indirectly via Amazon S3 (using the s3_bucket, s3_key and s3_object_version arguments). When providing the deployment package via S3 it may be useful to use the s3.BucketObject resource to upload it.

For larger deployment packages it is recommended by Amazon to upload via S3, since the S3 API has better support for uploading large files efficiently.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • compatible*runtimes (pulumi.Input[list]) –

    A list of [Runtimes][2] this layer is compatible with. Up to 5 runtimes can be specified.

  • description (pulumi.Input[str]) – Description of what your Lambda Layer does.

  • code (pulumi.Input[pulumi.Archive]) – The path to the function’s deployment package within the local filesystem. If defined, The s3*`-prefixed options cannot be used.

  • layer_name (pulumi.Input[str]) – A unique name for your Lambda Layer

  • license_info (pulumi.Input[str]) – License info for your Lambda Layer. See [License Info][3].

  • s3_bucket (pulumi.Input[str]) – The S3 bucket location containing the function’s deployment package. Conflicts with``filename``. This bucket must reside in the same AWS region where you are creating the Lambda function.

  • s3_key (pulumi.Input[str]) – The S3 key of an object containing the function’s deployment package. Conflicts with``filename``.

  • s3_object_version (pulumi.Input[str]) – The object version containing the function’s deployment package. Conflicts with``filename``.

  • source_code_hash (pulumi.Input[str]) – Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either``filenameors3_key. The usual way to set this is${filebase64sha256(“file.zip”)}(this provider 0.11.12 or later) or${base64sha256(file(“file.zip”))}` (this provider 0.11.11 and earlier), where “file.zip” is the local filename of the lambda layer source archive.

arn = None

The Amazon Resource Name (ARN) of the Lambda Layer with version.

compatible_runtimes = None

A list of [Runtimes][2] this layer is compatible with. Up to 5 runtimes can be specified.

created_date = None

The date this resource was created.

description = None

Description of what your Lambda Layer does.

code = None

The path to the function’s deployment package within the local filesystem. If defined, The s3_-prefixed options cannot be used.

layer_arn = None

The Amazon Resource Name (ARN) of the Lambda Layer without version.

layer_name = None

A unique name for your Lambda Layer

license_info = None

License info for your Lambda Layer. See [License Info][3].

s3_bucket = None

The S3 bucket location containing the function’s deployment package. Conflicts with filename. This bucket must reside in the same AWS region where you are creating the Lambda function.

s3_key = None

The S3 key of an object containing the function’s deployment package. Conflicts with filename.

s3_object_version = None

The object version containing the function’s deployment package. Conflicts with filename.

source_code_hash = None

Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key. The usual way to set this is ${filebase64sha256("file.zip")} (this provider 0.11.12 or later) or ${base64sha256(file("file.zip"))} (this provider 0.11.11 and earlier), where “file.zip” is the local filename of the lambda layer source archive.

source_code_size = None

The size in bytes of the function .zip file.

version = None

This Lamba Layer version.

static get(resource_name, id, opts=None, arn=None, compatible_runtimes=None, created_date=None, description=None, code=None, layer_arn=None, layer_name=None, license_info=None, s3_bucket=None, s3_key=None, s3_object_version=None, source_code_hash=None, source_code_size=None, version=None)

Get an existing LayerVersion resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) of the Lambda Layer with version.

  • compatible_runtimes (pulumi.Input[list]) – A list of [Runtimes][2] this layer is compatible with. Up to 5 runtimes can be specified.

  • created*date (pulumi.Input[str]) –

    The date this resource was created.

  • description (pulumi.Input[str]) – Description of what your Lambda Layer does.

  • code (pulumi.Input[pulumi.Archive]) – The path to the function’s deployment package within the local filesystem. If defined, The s3*`-prefixed options cannot be used.

  • layer_arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) of the Lambda Layer without version.

  • layer_name (pulumi.Input[str]) – A unique name for your Lambda Layer

  • license_info (pulumi.Input[str]) – License info for your Lambda Layer. See [License Info][3].

  • s3_bucket (pulumi.Input[str]) – The S3 bucket location containing the function’s deployment package. Conflicts with``filename``. This bucket must reside in the same AWS region where you are creating the Lambda function.

  • s3_key (pulumi.Input[str]) – The S3 key of an object containing the function’s deployment package. Conflicts with``filename``.

  • s3_object_version (pulumi.Input[str]) – The object version containing the function’s deployment package. Conflicts with``filename``.

  • source_code_hash (pulumi.Input[str]) – Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either``filenameors3_key. The usual way to set this is${filebase64sha256(“file.zip”)}(this provider 0.11.12 or later) or${base64sha256(file(“file.zip”))}` (this provider 0.11.11 and earlier), where “file.zip” is the local filename of the lambda layer source archive.

  • source_code_size (pulumi.Input[float]) – The size in bytes of the function .zip file.

  • version (pulumi.Input[str]) – This Lamba Layer version.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.lambda_.Permission(resource_name, opts=None, action=None, event_source_token=None, function=None, principal=None, qualifier=None, source_account=None, source_arn=None, statement_id=None, statement_id_prefix=None, __props__=None, __name__=None, __opts__=None)

Creates a Lambda permission to allow external sources invoking the Lambda function (e.g. CloudWatch Event Rule, SNS or S3).

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • action (pulumi.Input[str]) – The AWS Lambda action you want to allow in this statement. (e.g. lambda:InvokeFunction)

  • event_source_token (pulumi.Input[str]) – The Event Source Token to validate. Used with [Alexa Skills][1].

  • function (pulumi.Input[str]) – Name of the Lambda function whose resource policy you are updating

  • principal (pulumi.Input[str]) – The principal who is getting this permission. e.g. s3.amazonaws.com, an AWS account ID, or any valid AWS service principal such as events.amazonaws.com or sns.amazonaws.com.

  • qualifier (pulumi.Input[str]) – Query parameter to specify function version or alias name. The permission will then apply to the specific qualified ARN. e.g. arn:aws:lambda:aws-region:acct-id:function:function-name:2

  • source_account (pulumi.Input[str]) – This parameter is used for S3 and SES. The AWS account ID (without a hyphen) of the source owner.

  • source_arn (pulumi.Input[str]) – When granting Amazon S3 or CloudWatch Events permission to invoke your function, you should specify this field with the Amazon Resource Name (ARN) for the S3 Bucket or CloudWatch Events Rule as its value. This ensures that only events generated from the specified bucket or rule can invoke the function. API Gateway ARNs have a unique structure described here.

  • statement_id (pulumi.Input[str]) – A unique statement identifier. By default generated by this provider.

  • statement_id_prefix (pulumi.Input[str]) – A statement identifier prefix. This provider will generate a unique suffix. Conflicts with statement_id.

action = None

The AWS Lambda action you want to allow in this statement. (e.g. lambda:InvokeFunction)

event_source_token = None

The Event Source Token to validate. Used with [Alexa Skills][1].

function = None

Name of the Lambda function whose resource policy you are updating

principal = None

The principal who is getting this permission. e.g. s3.amazonaws.com, an AWS account ID, or any valid AWS service principal such as events.amazonaws.com or sns.amazonaws.com.

qualifier = None

Query parameter to specify function version or alias name. The permission will then apply to the specific qualified ARN. e.g. arn:aws:lambda:aws-region:acct-id:function:function-name:2

source_account = None

This parameter is used for S3 and SES. The AWS account ID (without a hyphen) of the source owner.

source_arn = None

When granting Amazon S3 or CloudWatch Events permission to invoke your function, you should specify this field with the Amazon Resource Name (ARN) for the S3 Bucket or CloudWatch Events Rule as its value. This ensures that only events generated from the specified bucket or rule can invoke the function. API Gateway ARNs have a unique structure described here.

statement_id = None

A unique statement identifier. By default generated by this provider.

statement_id_prefix = None

A statement identifier prefix. This provider will generate a unique suffix. Conflicts with statement_id.

static get(resource_name, id, opts=None, action=None, event_source_token=None, function=None, principal=None, qualifier=None, source_account=None, source_arn=None, statement_id=None, statement_id_prefix=None)

Get an existing Permission resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • action (pulumi.Input[str]) – The AWS Lambda action you want to allow in this statement. (e.g. lambda:InvokeFunction)

  • event_source_token (pulumi.Input[str]) – The Event Source Token to validate. Used with [Alexa Skills][1].

  • function (pulumi.Input[str]) – Name of the Lambda function whose resource policy you are updating

  • principal (pulumi.Input[str]) – The principal who is getting this permission. e.g. s3.amazonaws.com, an AWS account ID, or any valid AWS service principal such as events.amazonaws.com or sns.amazonaws.com.

  • qualifier (pulumi.Input[str]) – Query parameter to specify function version or alias name. The permission will then apply to the specific qualified ARN. e.g. arn:aws:lambda:aws-region:acct-id:function:function-name:2

  • source_account (pulumi.Input[str]) – This parameter is used for S3 and SES. The AWS account ID (without a hyphen) of the source owner.

  • source_arn (pulumi.Input[str]) –

    When granting Amazon S3 or CloudWatch Events permission to invoke your function, you should specify this field with the Amazon Resource Name (ARN) for the S3 Bucket or CloudWatch Events Rule as its value. This ensures that only events generated from the specified bucket or rule can invoke the function. API Gateway ARNs have a unique structure described here.

  • statement_id (pulumi.Input[str]) – A unique statement identifier. By default generated by this provider.

  • statement_id_prefix (pulumi.Input[str]) – A statement identifier prefix. This provider will generate a unique suffix. Conflicts with statement_id.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.lambda_.ProvisionedConcurrencyConfig(resource_name, opts=None, function_name=None, provisioned_concurrent_executions=None, qualifier=None, __props__=None, __name__=None, __opts__=None)

Manages a Lambda Provisioned Concurrency Configuration.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • function_name (pulumi.Input[str]) – Name or Amazon Resource Name (ARN) of the Lambda Function.

  • provisioned_concurrent_executions (pulumi.Input[float]) – Amount of capacity to allocate. Must be greater than or equal to 1.

  • qualifier (pulumi.Input[str]) – Lambda Function version or Lambda Alias name.

function_name = None

Name or Amazon Resource Name (ARN) of the Lambda Function.

provisioned_concurrent_executions = None

Amount of capacity to allocate. Must be greater than or equal to 1.

qualifier = None

Lambda Function version or Lambda Alias name.

static get(resource_name, id, opts=None, function_name=None, provisioned_concurrent_executions=None, qualifier=None)

Get an existing ProvisionedConcurrencyConfig resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • function_name (pulumi.Input[str]) – Name or Amazon Resource Name (ARN) of the Lambda Function.

  • provisioned_concurrent_executions (pulumi.Input[float]) – Amount of capacity to allocate. Must be greater than or equal to 1.

  • qualifier (pulumi.Input[str]) – Lambda Function version or Lambda Alias name.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

pulumi_aws.lambda_.get_function(function_name=None, qualifier=None, tags=None, opts=None)

Provides information about a Lambda Function.

Parameters
  • function_name (str) – Name of the lambda function.

  • qualifier (str) – Alias name or version number of the lambda function. e.g. $LATEST, my-alias, or 1

pulumi_aws.lambda_.get_invocation(function_name=None, input=None, qualifier=None, opts=None)

Use this data source to invoke custom lambda functions as data source. The lambda function is invoked with RequestResponse invocation type.

Parameters
  • function_name (str) – The name of the lambda function.

  • input (str) – A string in JSON format that is passed as payload to the lambda function.

  • qualifier (str) – The qualifier (a.k.a version) of the lambda function. Defaults to $LATEST.

pulumi_aws.lambda_.get_layer_version(compatible_runtime=None, layer_name=None, version=None, opts=None)

Provides information about a Lambda Layer Version.

Parameters
  • compatible_runtime (str) – Specific runtime the layer version must support. Conflicts with version. If specified, the latest available layer version supporting the provided runtime will be used.

  • layer_name (str) – Name of the lambda layer.

  • version (float) – Specific layer version. Conflicts with compatible_runtime. If omitted, the latest available layer version will be used.