Skip to content

awsLambdaFunction

Provides information about a Lambda Function.

Example Usage

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
/*Terraform Variables are not always the best fit for getting inputs in the context of Terraform CDK.
You can read more about this at https://cdk.tf/variables*/
const functionName = new cdktf.TerraformVariable(this, "function_name", {});
new aws.dataAwsLambdaFunction.DataAwsLambdaFunction(this, "existing", {
  functionName: functionName.value,
});

Argument Reference

The following arguments are supported:

  • functionName - (Required) Name of the lambda function.
  • qualifier - (Optional) Alias name or version number of the lambda functionE.g., $latest, myAlias, or 1. When not included: the data source resolves to the most recent published version; if no published version exists: it resolves to the most recent unpublished version.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • architectures - Instruction set architecture for the Lambda function.
  • arn - Unqualified (no :qualifier or :version suffix) ARN identifying your Lambda Function. See also qualifiedArn.
  • codeSigningConfigArn - ARN for a Code Signing Configuration.
  • deadLetterConfig - Configure the function's dead letter queue.
  • description - Description of what your Lambda Function does.
  • environment - Lambda environment's configuration settings.
  • ephemeralStorage - Amount of Ephemeral storage(/tmp) allocated for the Lambda Function.
  • fileSystemConfig - Connection settings for an Amazon EFS file system.
  • handler - Function entrypoint in your code.
  • imageUri - URI of the container image.
  • invokeArn - ARN to be used for invoking Lambda Function from API Gateway. NOTE: Starting with v4510 of the provider, this will not include the qualifier.
  • kmsKeyArn - ARN for the KMS encryption key.
  • lastModified - Date this resource was last modified.
  • layers - List of Lambda Layer ARNs attached to your Lambda Function.
  • memorySize - Amount of memory in MB your Lambda Function can use at runtime.
  • qualifiedArn - Qualified (:qualifier or :version suffix) ARN identifying your Lambda Function. See also arn.
  • qualifiedInvokeArn - Qualified (:qualifier or :version suffix) ARN to be used for invoking Lambda Function from API Gateway. See also invokeArn.
  • reservedConcurrentExecutions - The amount of reserved concurrent executions for this lambda function or 1 if unreserved.
  • role - IAM role attached to the Lambda Function.
  • runtime - Runtime environment for the Lambda function.
  • signingJobArn - ARN of a signing job.
  • signingProfileVersionArn - The ARN for a signing profile version.
  • sourceCodeHash - Base64-encoded representation of raw SHA-256 sum of the zip file.
  • sourceCodeSize - Size in bytes of the function .zip file.
  • timeout - Function execution time at which Lambda should terminate the function.
  • tracingConfig - Tracing settings of the function.
  • version - The version of the Lambda function returned. If qualifier is not set, this will resolve to the most recent published version. If no published version of the function exists, version will resolve to $latest.
  • vpcConfig - VPC configuration associated with your Lambda function.