com.monsanto.arch.cloudformation.model.resource
AWS::Lambda::Function
Companion object AWS::Lambda::Function
case class AWS::Lambda::Function(name: String, Code: Code, Handler: String, Runtime: Runtime, Role: Token[String], FunctionName: Option[Token[String]] = None, Description: Option[Token[String]] = None, DeadLetterConfig: Option[DeadLetterConfig] = None, MemorySize: Option[Token[Int]] = None, Timeout: Option[Token[Int]] = None, TracingConfig: Option[TracingConfig] = None, Environment: Option[LambdaEnvironment] = None, KmsKeyArn: Option[Token[String]] = None, VpcConfig: Option[LambdaVpcConfig] = None, Tags: Option[Seq[AmazonTag]] = None, DependsOn: Option[Seq[String]] = None, Condition: Option[ConditionRef] = None) extends Resource[AWS::Lambda::Function] with HasArn with Subscribable with Product with Serializable
The AWS::Lambda::Function resource creates an AWS Lambda (Lambda) function that can run code in response to events. For more information, see CreateFunction in the AWS Lambda Developer Guide.
- name
CloudFormation logical name
- Code
The source code of your Lambda function. You can point to a file in an Amazon Simple Storage Service (Amazon S3) bucket or specify your source code as inline text.
- Handler
The name of the function (within your source code) that Lambda calls to start running your code. *Note:* If you specify your source code as inline text by specifying the ZipFile property within the Code property, specify index.function_name as the handler.
- Runtime
The runtime environment for the Lambda function that you are uploading.
- Role
The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) execution role that Lambda assumes when it runs your code to access AWS services.
- FunctionName
A name for the function. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. *Important:* If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
- Description
A description of the function.
- DeadLetterConfig
Configures how Lambda handles events that it can't process. If you don't specify a Dead Letter Queue (DLQ) configuration, Lambda discards events after the maximum number of retries.
- MemorySize
The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. Your function use case determines your CPU and memory requirements. For example, a database operation might need less memory than an image processing function. You must specify a value that is greater than or equal to 128, and it must be a multiple of 64. You cannot specify a size larger than 1536. The default value is 128 MB.
- Timeout
The function execution time (in seconds) after which Lambda terminates the function. Because the execution time affects cost, set this value based on the function's expected execution time. By default, Timeout is set to 3 seconds.
- TracingConfig
The parent object that contains your Lambda function's tracing settings. By default, the Mode property is set to PassThrough.
- Environment
Key-value pairs that Lambda caches and makes available for your Lambda functions. Use environment variables to apply configuration changes, such as test and production environment configurations, without changing your Lambda function source code.
- KmsKeyArn
The Amazon Resource Name (ARN) of an AWS Key Management Service (AWS KMS) key that Lambda uses to encrypt and decrypt environment variable values.
- VpcConfig
If the Lambda function requires access to resources in a VPC, specify a VPC configuration that Lambda uses to set up an elastic network interface (ENI). The ENI enables your function to connect to other resources in your VPC, but it doesn't provide public Internet access. If your function requires Internet access (for example, to access AWS services that don't have VPC endpoints), configure a Network Address Translation (NAT) instance inside your VPC or use an Amazon Virtual Private Cloud (Amazon VPC) NAT gateway. *Note:* When you specify this property, AWS CloudFormation might not be able to delete the stack if another resource in the template (such as a security group) requires the attached ENI to be deleted before it can be deleted. We recommend that you run AWS CloudFormation with the ec2:DescribeNetworkInterfaces permission, which enables AWS CloudFormation to monitor the state of the ENI and to wait (up to 40 minutes) for Lambda to delete the ENI.
- Tags
An arbitrary set of tags (key–value pairs) for this Lambda function.
- DependsOn
Declare dependencies for resources that must be created or deleted in a specific order.
- Condition
Define conditions by using the intrinsic condition functions. These conditions determine when AWS CloudFormation creates the associated resources.
- Alphabetic
- By Inheritance
- AWS::Lambda::Function
- Serializable
- Serializable
- Product
- Equals
- Subscribable
- HasArn
- Resource
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
AWS::Lambda::Function(name: String, Code: Code, Handler: String, Runtime: Runtime, Role: Token[String], FunctionName: Option[Token[String]] = None, Description: Option[Token[String]] = None, DeadLetterConfig: Option[DeadLetterConfig] = None, MemorySize: Option[Token[Int]] = None, Timeout: Option[Token[Int]] = None, TracingConfig: Option[TracingConfig] = None, Environment: Option[LambdaEnvironment] = None, KmsKeyArn: Option[Token[String]] = None, VpcConfig: Option[LambdaVpcConfig] = None, Tags: Option[Seq[AmazonTag]] = None, DependsOn: Option[Seq[String]] = None, Condition: Option[ConditionRef] = None)
- name
CloudFormation logical name
- Code
The source code of your Lambda function. You can point to a file in an Amazon Simple Storage Service (Amazon S3) bucket or specify your source code as inline text.
- Handler
The name of the function (within your source code) that Lambda calls to start running your code. *Note:* If you specify your source code as inline text by specifying the ZipFile property within the Code property, specify index.function_name as the handler.
- Runtime
The runtime environment for the Lambda function that you are uploading.
- Role
The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) execution role that Lambda assumes when it runs your code to access AWS services.
- FunctionName
A name for the function. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. *Important:* If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
- Description
A description of the function.
- DeadLetterConfig
Configures how Lambda handles events that it can't process. If you don't specify a Dead Letter Queue (DLQ) configuration, Lambda discards events after the maximum number of retries.
- MemorySize
The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. Your function use case determines your CPU and memory requirements. For example, a database operation might need less memory than an image processing function. You must specify a value that is greater than or equal to 128, and it must be a multiple of 64. You cannot specify a size larger than 1536. The default value is 128 MB.
- Timeout
The function execution time (in seconds) after which Lambda terminates the function. Because the execution time affects cost, set this value based on the function's expected execution time. By default, Timeout is set to 3 seconds.
- TracingConfig
The parent object that contains your Lambda function's tracing settings. By default, the Mode property is set to PassThrough.
- Environment
Key-value pairs that Lambda caches and makes available for your Lambda functions. Use environment variables to apply configuration changes, such as test and production environment configurations, without changing your Lambda function source code.
- KmsKeyArn
The Amazon Resource Name (ARN) of an AWS Key Management Service (AWS KMS) key that Lambda uses to encrypt and decrypt environment variable values.
- VpcConfig
If the Lambda function requires access to resources in a VPC, specify a VPC configuration that Lambda uses to set up an elastic network interface (ENI). The ENI enables your function to connect to other resources in your VPC, but it doesn't provide public Internet access. If your function requires Internet access (for example, to access AWS services that don't have VPC endpoints), configure a Network Address Translation (NAT) instance inside your VPC or use an Amazon Virtual Private Cloud (Amazon VPC) NAT gateway. *Note:* When you specify this property, AWS CloudFormation might not be able to delete the stack if another resource in the template (such as a security group) requires the attached ENI to be deleted before it can be deleted. We recommend that you run AWS CloudFormation with the ec2:DescribeNetworkInterfaces permission, which enables AWS CloudFormation to monitor the state of the ENI and to wait (up to 40 minutes) for Lambda to delete the ENI.
- Tags
An arbitrary set of tags (key–value pairs) for this Lambda function.
- DependsOn
Declare dependencies for resources that must be created or deleted in a specific order.
- Condition
Define conditions by using the intrinsic condition functions. These conditions determine when AWS CloudFormation creates the associated resources.
Type Members
-
type
RR = Resource[AWS::Lambda::Function]
- Definition Classes
- Resource
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val Code: Code
-
val
Condition: Option[ConditionRef]
- Definition Classes
- AWS::Lambda::Function → Resource
- val DeadLetterConfig: Option[DeadLetterConfig]
-
val
DeletionPolicy: Option[DeletionPolicy]
- Definition Classes
- Resource
-
val
DependsOn: Option[Seq[String]]
- Definition Classes
- AWS::Lambda::Function → Resource
- val Description: Option[Token[String]]
- val Environment: Option[LambdaEnvironment]
- val FunctionName: Option[Token[String]]
- val Handler: String
- val KmsKeyArn: Option[Token[String]]
- val MemorySize: Option[Token[Int]]
-
val
ResourceType: String
- Definition Classes
- Resource
- val Role: Token[String]
- val Runtime: Runtime
- val Tags: Option[Seq[AmazonTag]]
- val Timeout: Option[Token[Int]]
- val TracingConfig: Option[TracingConfig]
- val VpcConfig: Option[LambdaVpcConfig]
-
def
arn: FunctionCallToken[String]
- Definition Classes
- AWS::Lambda::Function → HasArn
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asSubscription: AnyToken[Subscription]
- Definition Classes
- AWS::Lambda::Function → Subscribable
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
name: String
- Definition Classes
- AWS::Lambda::Function → HasArn → Resource
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
when(newCondition: Option[ConditionRef] = Condition): AWS::Lambda::Function
- Definition Classes
- AWS::Lambda::Function → Resource