Packages

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.

Linear Supertypes
Serializable, Serializable, Product, Equals, Subscribable, HasArn, Resource[AWS::Lambda::Function], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AWS::Lambda::Function
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Subscribable
  7. HasArn
  8. Resource
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. 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

  1. type RR = Resource[AWS::Lambda::Function]
    Definition Classes
    Resource

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val Code: Code
  5. val Condition: Option[ConditionRef]
    Definition Classes
    AWS::Lambda::FunctionResource
  6. val DeadLetterConfig: Option[DeadLetterConfig]
  7. val DeletionPolicy: Option[DeletionPolicy]
    Definition Classes
    Resource
  8. val DependsOn: Option[Seq[String]]
    Definition Classes
    AWS::Lambda::FunctionResource
  9. val Description: Option[Token[String]]
  10. val Environment: Option[LambdaEnvironment]
  11. val FunctionName: Option[Token[String]]
  12. val Handler: String
  13. val KmsKeyArn: Option[Token[String]]
  14. val MemorySize: Option[Token[Int]]
  15. val ResourceType: String
    Definition Classes
    Resource
  16. val Role: Token[String]
  17. val Runtime: Runtime
  18. val Tags: Option[Seq[AmazonTag]]
  19. val Timeout: Option[Token[Int]]
  20. val TracingConfig: Option[TracingConfig]
  21. val VpcConfig: Option[LambdaVpcConfig]
  22. def arn: FunctionCallToken[String]
    Definition Classes
    AWS::Lambda::FunctionHasArn
  23. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  24. def asSubscription: AnyToken[Subscription]
    Definition Classes
    AWS::Lambda::FunctionSubscribable
  25. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  26. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  29. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  30. val name: String
    Definition Classes
    AWS::Lambda::FunctionHasArnResource
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  38. def when(newCondition: Option[ConditionRef] = Condition): AWS::Lambda::Function
    Definition Classes
    AWS::Lambda::FunctionResource

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Subscribable

Inherited from HasArn

Inherited from AnyRef

Inherited from Any

Ungrouped