View a markdown version of this page

AWS::Lambda::Runtime - AWS CloudFormation

This is the new CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.

AWS::Lambda::Runtime

The AWS::Lambda::Runtime resource creates a customer-managed runtime. A customer-managed runtime provides a centrally managed execution environment for your Lambda functions. It is the parent of runtime versions and runtime aliases. To publish a container image as a runtime version, use the AWS::Lambda::RuntimeVersion resource. To give functions a named pointer to a version, use the AWS::Lambda::RuntimeAlias resource.

When you delete this resource, Lambda schedules it for deletion after a 30-day recovery window, and CloudFormation treats it as deleted. Until the window ends, the name stays reserved: you can't create a runtime with the same name, so use a new name if you re-create it.

Syntax

To declare this entity in your CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::Lambda::Runtime", "Properties" : { "Description" : String, "LicenseInfo" : String, "Name" : String, "ReleaseLifecycle" : ReleaseLifecycle, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::Lambda::Runtime Properties: Description: String LicenseInfo: String Name: String ReleaseLifecycle: ReleaseLifecycle Tags: - Tag

Properties

Description

A description of the runtime. If you remove this property from the template, the description is cleared.

Required: No

Type: String

Minimum: 1

Maximum: 1024

Update requires: No interruption

LicenseInfo

The license information for the runtime. If you remove this property from the template, the license information is cleared.

Required: No

Type: String

Minimum: 1

Maximum: 1024

Update requires: No interruption

Name

The name of the runtime to create.

Required: Yes

Type: String

Pattern: ^[a-z0-9]([a-z0-9_.-]{0,126})?[a-z0-9]$

Minimum: 2

Maximum: 128

Update requires: Replacement

ReleaseLifecycle

The runtime lifecycle for the runtime (optional). Use this to schedule runtime deprecation.

Required: No

Type: ReleaseLifecycle

Update requires: No interruption

Tags

A list of tags to apply to the runtime.

Note

You must have the lambda:TagResource, lambda:UntagResource, and lambda:ListTags permissions for your IAM principal to manage the CloudFormation stack. If you don't have these permissions, there might be unexpected behavior with stack-level tags propagating to the resource during resource creation and update.

Required: No

Type: Array of Tag

Maximum: 50

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Amazon Resource Name (ARN) of the runtime.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

Arn

The Amazon Resource Name (ARN) of the runtime.

Created

The date and time when the runtime was created.

LastModified

The date and time when the runtime was last modified.

State

The current state of the runtime.

Examples

Customer-managed runtime

Create a runtime named my-runtime that is generally available and scheduled for deprecation.

JSON

"MyRuntime": { "Type": "AWS::Lambda::Runtime", "Properties": { "Name": "my-runtime", "Description": "Runtime for my functions", "LicenseInfo": "MIT", "ReleaseLifecycle": { "ReleaseState": "GA", "DeprecationDate": "2027-12-31" }, "Tags": [ { "Key": "Environment", "Value": "Production" } ] } }

YAML

MyRuntime: Type: AWS::Lambda::Runtime Properties: Name: my-runtime Description: Runtime for my functions LicenseInfo: MIT ReleaseLifecycle: ReleaseState: GA DeprecationDate: "2027-12-31" Tags: - Key: Environment Value: Production