

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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS Lambda
<a name="AWS_Lambda"></a>

**Resource types**
+ [AWS::Lambda::Alias](aws-resource-lambda-alias.md)
+ [AWS::Lambda::CapacityProvider](aws-resource-lambda-capacityprovider.md)
+ [AWS::Lambda::CodeSigningConfig](aws-resource-lambda-codesigningconfig.md)
+ [AWS::Lambda::EventInvokeConfig](aws-resource-lambda-eventinvokeconfig.md)
+ [AWS::Lambda::EventSourceMapping](aws-resource-lambda-eventsourcemapping.md)
+ [AWS::Lambda::Function](aws-resource-lambda-function.md)
+ [AWS::Lambda::LayerVersion](aws-resource-lambda-layerversion.md)
+ [AWS::Lambda::LayerVersionPermission](aws-resource-lambda-layerversionpermission.md)
+ [AWS::Lambda::Permission](aws-resource-lambda-permission.md)
+ [AWS::Lambda::Url](aws-resource-lambda-url.md)
+ [AWS::Lambda::Version](aws-resource-lambda-version.md)

# AWS::Lambda::Alias
<a name="aws-resource-lambda-alias"></a>

The `AWS::Lambda::Alias` resource creates an [alias](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) for a Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version.

You can also map an alias to split invocation requests between two versions. Use the `RoutingConfig` parameter to specify a second version and the percentage of invocation requests that it receives.

## Syntax
<a name="aws-resource-lambda-alias-syntax"></a>

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

### JSON
<a name="aws-resource-lambda-alias-syntax.json"></a>

```
{
  "Type" : "AWS::Lambda::Alias",
  "Properties" : {
      "[Description](#cfn-lambda-alias-description)" : String,
      "[FunctionName](#cfn-lambda-alias-functionname)" : String,
      "[FunctionVersion](#cfn-lambda-alias-functionversion)" : String,
      "[Name](#cfn-lambda-alias-name)" : String,
      "[ProvisionedConcurrencyConfig](#cfn-lambda-alias-provisionedconcurrencyconfig)" : ProvisionedConcurrencyConfiguration,
      "[RoutingConfig](#cfn-lambda-alias-routingconfig)" : AliasRoutingConfiguration
    }
}
```

### YAML
<a name="aws-resource-lambda-alias-syntax.yaml"></a>

```
Type: AWS::Lambda::Alias
Properties:
  [Description](#cfn-lambda-alias-description): String
  [FunctionName](#cfn-lambda-alias-functionname): String
  [FunctionVersion](#cfn-lambda-alias-functionversion): String
  [Name](#cfn-lambda-alias-name): String
  [ProvisionedConcurrencyConfig](#cfn-lambda-alias-provisionedconcurrencyconfig): 
    ProvisionedConcurrencyConfiguration
  [RoutingConfig](#cfn-lambda-alias-routingconfig): 
    AliasRoutingConfiguration
```

## Properties
<a name="aws-resource-lambda-alias-properties"></a>

`Description`  <a name="cfn-lambda-alias-description"></a>
A description of the alias.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FunctionName`  <a name="cfn-lambda-alias-functionname"></a>
The name or ARN of the Lambda function.  

**Name formats**
+ **Function name** - `MyFunction`.
+ **Function ARN** - `arn:aws:lambda:us-west-2:123456789012:function:MyFunction`.
+ **Partial ARN** - `123456789012:function:MyFunction`.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.  
*Required*: Yes  
*Type*: String  
*Pattern*: `(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?`  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FunctionVersion`  <a name="cfn-lambda-alias-functionversion"></a>
The function version that the alias invokes.  
*Required*: Yes  
*Type*: String  
*Pattern*: `(\$LATEST|[0-9]+)`  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-lambda-alias-name"></a>
The name of the alias.  
*Required*: Yes  
*Type*: String  
*Pattern*: `(?!^[0-9]+$)([a-zA-Z0-9-_]+)`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ProvisionedConcurrencyConfig`  <a name="cfn-lambda-alias-provisionedconcurrencyconfig"></a>
Specifies a [provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html) configuration for a function's alias.  
*Required*: No  
*Type*: [ProvisionedConcurrencyConfiguration](aws-properties-lambda-alias-provisionedconcurrencyconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoutingConfig`  <a name="cfn-lambda-alias-routingconfig"></a>
The [routing configuration](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) of the alias.  
*Required*: No  
*Type*: [AliasRoutingConfiguration](aws-properties-lambda-alias-aliasroutingconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-lambda-alias-return-values"></a>

### Ref
<a name="aws-resource-lambda-alias-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the resource ARN.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-lambda-alias-return-values-fn--getatt"></a>

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 [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-lambda-alias-return-values-fn--getatt-fn--getatt"></a>

`AliasArn`  <a name="AliasArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the alias.

## Examples
<a name="aws-resource-lambda-alias--examples"></a>



**Topics**
+ [Alias](#aws-resource-lambda-alias--examples--Alias)
+ [Weighted Alias](#aws-resource-lambda-alias--examples--Weighted_Alias)

### Alias
<a name="aws-resource-lambda-alias--examples--Alias"></a>

A Node.js function with a version and alias.

#### YAML
<a name="aws-resource-lambda-alias--examples--Alias--yaml"></a>

```
Resources:
  function:
    Type: AWS::Lambda::Function
    Properties:
      Handler: index.handler
      Role: arn:aws:iam::123456789012:role/lambda-role
      Code:
        ZipFile: |
          exports.handler = function(event){
              console.log(JSON.stringify(event, null, 2))
              const response = {
                  statusCode: 200,
                  body: JSON.stringify('Hello from Lambda!')
              }
              return response
          };
      Runtime: nodejs18.x
      TracingConfig:
        Mode: Active
  version:
    Type: AWS::Lambda::Version
    Properties:
      FunctionName: !Ref function
      Description: v1
  alias:
    Type: AWS::Lambda::Alias
    Properties:
      FunctionName: !Ref function
      FunctionVersion: !GetAtt version.Version
      Name: BLUE
```

### Weighted Alias
<a name="aws-resource-lambda-alias--examples--Weighted_Alias"></a>

An alias that routes requests to two versions.

#### YAML
<a name="aws-resource-lambda-alias--examples--Weighted_Alias--yaml"></a>

```
Resources:
  function:
    Type: AWS::Lambda::Function
    Properties:
      Handler: index.handler
      Role: arn:aws:iam::123456789012:role/lambda-role
      Code:
        ZipFile: |
          exports.handler = function(event){
              console.log(JSON.stringify(event, null, 2))
              const response = {
                  statusCode: 200,
                  body: JSON.stringify('Hello again from Lambda!')
              }
              return response
          }
      Runtime: nodejs18.x
      TracingConfig:
        Mode: Active
  version:
    Type: AWS::Lambda::Version
    Properties:
      FunctionName: !Ref function
      Description: v1
  newVersion:
    Type: AWS::Lambda::Version
    Properties:
      FunctionName: !Ref function
      Description: v2
  alias:
    Type: AWS::Lambda::Alias
    Properties:
      FunctionName: !Ref function
      FunctionVersion: !GetAtt newVersion.Version
      Name: BLUE
      RoutingConfig:
        AdditionalVersionWeights:
          - FunctionVersion: !GetAtt version.Version
            FunctionWeight: 0.5
```

# AWS::Lambda::Alias AliasRoutingConfiguration
<a name="aws-properties-lambda-alias-aliasroutingconfiguration"></a>

The [traffic-shifting](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) configuration of a Lambda function alias.

## Syntax
<a name="aws-properties-lambda-alias-aliasroutingconfiguration-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-alias-aliasroutingconfiguration-syntax.json"></a>

```
{
  "[AdditionalVersionWeights](#cfn-lambda-alias-aliasroutingconfiguration-additionalversionweights)" : [ VersionWeight, ... ]
}
```

### YAML
<a name="aws-properties-lambda-alias-aliasroutingconfiguration-syntax.yaml"></a>

```
  [AdditionalVersionWeights](#cfn-lambda-alias-aliasroutingconfiguration-additionalversionweights): 
    - VersionWeight
```

## Properties
<a name="aws-properties-lambda-alias-aliasroutingconfiguration-properties"></a>

`AdditionalVersionWeights`  <a name="cfn-lambda-alias-aliasroutingconfiguration-additionalversionweights"></a>
The second version, and the percentage of traffic that's routed to it.  
*Required*: No  
*Type*: Array of [VersionWeight](aws-properties-lambda-alias-versionweight.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-lambda-alias-aliasroutingconfiguration--examples"></a>



### Routing Configuration
<a name="aws-properties-lambda-alias-aliasroutingconfiguration--examples--Routing_Configuration"></a>

An alias that routes half of incoming requests to a second version.

#### YAML
<a name="aws-properties-lambda-alias-aliasroutingconfiguration--examples--Routing_Configuration--yaml"></a>

```
  alias:
    Type: AWS::Lambda::Alias
    Properties:
      FunctionName: !Ref function
      FunctionVersion: !GetAtt newVersion.Version
      Name: BLUE
      RoutingConfig:
        AdditionalVersionWeights:
          - FunctionVersion: !GetAtt version.Version
            FunctionWeight: 0.5
```

# AWS::Lambda::Alias ProvisionedConcurrencyConfiguration
<a name="aws-properties-lambda-alias-provisionedconcurrencyconfiguration"></a>

A provisioned concurrency configuration for a function's alias.

## Syntax
<a name="aws-properties-lambda-alias-provisionedconcurrencyconfiguration-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-alias-provisionedconcurrencyconfiguration-syntax.json"></a>

```
{
  "[ProvisionedConcurrentExecutions](#cfn-lambda-alias-provisionedconcurrencyconfiguration-provisionedconcurrentexecutions)" : Integer
}
```

### YAML
<a name="aws-properties-lambda-alias-provisionedconcurrencyconfiguration-syntax.yaml"></a>

```
  [ProvisionedConcurrentExecutions](#cfn-lambda-alias-provisionedconcurrencyconfiguration-provisionedconcurrentexecutions): Integer
```

## Properties
<a name="aws-properties-lambda-alias-provisionedconcurrencyconfiguration-properties"></a>

`ProvisionedConcurrentExecutions`  <a name="cfn-lambda-alias-provisionedconcurrencyconfiguration-provisionedconcurrentexecutions"></a>
The amount of provisioned concurrency to allocate for the alias.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-lambda-alias-provisionedconcurrencyconfiguration--examples"></a>



### Provisioned Concurrency
<a name="aws-properties-lambda-alias-provisionedconcurrencyconfiguration--examples--Provisioned_Concurrency"></a>

An alias with 20 provisioned concurrency.

#### YAML
<a name="aws-properties-lambda-alias-provisionedconcurrencyconfiguration--examples--Provisioned_Concurrency--yaml"></a>

```
  alias:
    Type: AWS::Lambda::Alias
    Properties:
      FunctionName: !Ref function
      FunctionVersion: !GetAtt newVersion.Version
      Name: BLUE
      ProvisionedConcurrencyConfig:
        ProvisionedConcurrentExecutions: 20
```

# AWS::Lambda::Alias VersionWeight
<a name="aws-properties-lambda-alias-versionweight"></a>

The [traffic-shifting](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) configuration of a Lambda function alias.

## Syntax
<a name="aws-properties-lambda-alias-versionweight-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-alias-versionweight-syntax.json"></a>

```
{
  "[FunctionVersion](#cfn-lambda-alias-versionweight-functionversion)" : String,
  "[FunctionWeight](#cfn-lambda-alias-versionweight-functionweight)" : Number
}
```

### YAML
<a name="aws-properties-lambda-alias-versionweight-syntax.yaml"></a>

```
  [FunctionVersion](#cfn-lambda-alias-versionweight-functionversion): String
  [FunctionWeight](#cfn-lambda-alias-versionweight-functionweight): Number
```

## Properties
<a name="aws-properties-lambda-alias-versionweight-properties"></a>

`FunctionVersion`  <a name="cfn-lambda-alias-versionweight-functionversion"></a>
The qualifier of the second version.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FunctionWeight`  <a name="cfn-lambda-alias-versionweight-functionweight"></a>
The percentage of traffic that the alias routes to the second version.  
*Required*: Yes  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-lambda-alias-versionweight--examples"></a>



### Routing Configuration
<a name="aws-properties-lambda-alias-versionweight--examples--Routing_Configuration"></a>

An alias that routes half of incoming requests to a second version.

#### YAML
<a name="aws-properties-lambda-alias-versionweight--examples--Routing_Configuration--yaml"></a>

```
  alias:
    Type: AWS::Lambda::Alias
    Properties:
      FunctionName: !Ref function
      FunctionVersion: !GetAtt newVersion.Version
      Name: BLUE
      RoutingConfig:
        AdditionalVersionWeights:
          - FunctionVersion: !GetAtt version.Version
            FunctionWeight: 0.5
```

# AWS::Lambda::CapacityProvider
<a name="aws-resource-lambda-capacityprovider"></a>

Creates a capacity provider that manages compute resources for Lambda functions

## Syntax
<a name="aws-resource-lambda-capacityprovider-syntax"></a>

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

### JSON
<a name="aws-resource-lambda-capacityprovider-syntax.json"></a>

```
{
  "Type" : "AWS::Lambda::CapacityProvider",
  "Properties" : {
      "[CapacityProviderName](#cfn-lambda-capacityprovider-capacityprovidername)" : String,
      "[CapacityProviderScalingConfig](#cfn-lambda-capacityprovider-capacityproviderscalingconfig)" : CapacityProviderScalingConfig,
      "[InstanceRequirements](#cfn-lambda-capacityprovider-instancerequirements)" : InstanceRequirements,
      "[KmsKeyArn](#cfn-lambda-capacityprovider-kmskeyarn)" : String,
      "[PermissionsConfig](#cfn-lambda-capacityprovider-permissionsconfig)" : CapacityProviderPermissionsConfig,
      "[Tags](#cfn-lambda-capacityprovider-tags)" : [ Tag, ... ],
      "[VpcConfig](#cfn-lambda-capacityprovider-vpcconfig)" : CapacityProviderVpcConfig
    }
}
```

### YAML
<a name="aws-resource-lambda-capacityprovider-syntax.yaml"></a>

```
Type: AWS::Lambda::CapacityProvider
Properties:
  [CapacityProviderName](#cfn-lambda-capacityprovider-capacityprovidername): String
  [CapacityProviderScalingConfig](#cfn-lambda-capacityprovider-capacityproviderscalingconfig): 
    CapacityProviderScalingConfig
  [InstanceRequirements](#cfn-lambda-capacityprovider-instancerequirements): 
    InstanceRequirements
  [KmsKeyArn](#cfn-lambda-capacityprovider-kmskeyarn): String
  [PermissionsConfig](#cfn-lambda-capacityprovider-permissionsconfig): 
    CapacityProviderPermissionsConfig
  [Tags](#cfn-lambda-capacityprovider-tags): 
    - Tag
  [VpcConfig](#cfn-lambda-capacityprovider-vpcconfig): 
    CapacityProviderVpcConfig
```

## Properties
<a name="aws-resource-lambda-capacityprovider-properties"></a>

`CapacityProviderName`  <a name="cfn-lambda-capacityprovider-capacityprovidername"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Pattern*: `^(arn:aws[a-zA-Z-]*:lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:capacity-provider:[a-zA-Z0-9-_]+)|[a-zA-Z0-9-_]+$`  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`CapacityProviderScalingConfig`  <a name="cfn-lambda-capacityprovider-capacityproviderscalingconfig"></a>
The scaling configuration for the capacity provider.  
*Required*: No  
*Type*: [CapacityProviderScalingConfig](aws-properties-lambda-capacityprovider-capacityproviderscalingconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InstanceRequirements`  <a name="cfn-lambda-capacityprovider-instancerequirements"></a>
The instance requirements for compute resources managed by the capacity provider.  
*Required*: No  
*Type*: [InstanceRequirements](aws-properties-lambda-capacityprovider-instancerequirements.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`KmsKeyArn`  <a name="cfn-lambda-capacityprovider-kmskeyarn"></a>
The ARN of the KMS key used to encrypt the capacity provider's resources.  
*Required*: No  
*Type*: String  
*Pattern*: `^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$`  
*Minimum*: `0`  
*Maximum*: `10000`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PermissionsConfig`  <a name="cfn-lambda-capacityprovider-permissionsconfig"></a>
The permissions configuration for the capacity provider.  
*Required*: Yes  
*Type*: [CapacityProviderPermissionsConfig](aws-properties-lambda-capacityprovider-capacityproviderpermissionsconfig.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-lambda-capacityprovider-tags"></a>
A key-value pair that provides metadata for the capacity provider.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-lambda-capacityprovider-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VpcConfig`  <a name="cfn-lambda-capacityprovider-vpcconfig"></a>
The VPC configuration for the capacity provider.  
*Required*: Yes  
*Type*: [CapacityProviderVpcConfig](aws-properties-lambda-capacityprovider-capacityprovidervpcconfig.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-lambda-capacityprovider-return-values"></a>

### Ref
<a name="aws-resource-lambda-capacityprovider-return-values-ref"></a>

### Fn::GetAtt
<a name="aws-resource-lambda-capacityprovider-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-lambda-capacityprovider-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
Property description not available.

`State`  <a name="State-fn::getatt"></a>
The current state of the capacity provider.

# AWS::Lambda::CapacityProvider CapacityProviderPermissionsConfig
<a name="aws-properties-lambda-capacityprovider-capacityproviderpermissionsconfig"></a>

Configuration that specifies the permissions required for the capacity provider to manage compute resources.

## Syntax
<a name="aws-properties-lambda-capacityprovider-capacityproviderpermissionsconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-capacityprovider-capacityproviderpermissionsconfig-syntax.json"></a>

```
{
  "[CapacityProviderOperatorRoleArn](#cfn-lambda-capacityprovider-capacityproviderpermissionsconfig-capacityprovideroperatorrolearn)" : String
}
```

### YAML
<a name="aws-properties-lambda-capacityprovider-capacityproviderpermissionsconfig-syntax.yaml"></a>

```
  [CapacityProviderOperatorRoleArn](#cfn-lambda-capacityprovider-capacityproviderpermissionsconfig-capacityprovideroperatorrolearn): String
```

## Properties
<a name="aws-properties-lambda-capacityprovider-capacityproviderpermissionsconfig-properties"></a>

`CapacityProviderOperatorRoleArn`  <a name="cfn-lambda-capacityprovider-capacityproviderpermissionsconfig-capacityprovideroperatorrolearn"></a>
The ARN of the IAM role that the capacity provider uses to manage compute instances and other AWS resources.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+$`  
*Minimum*: `0`  
*Maximum*: `10000`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Lambda::CapacityProvider CapacityProviderScalingConfig
<a name="aws-properties-lambda-capacityprovider-capacityproviderscalingconfig"></a>

Configuration that defines how the capacity provider scales compute instances based on demand and policies.

## Syntax
<a name="aws-properties-lambda-capacityprovider-capacityproviderscalingconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-capacityprovider-capacityproviderscalingconfig-syntax.json"></a>

```
{
  "[MaxVCpuCount](#cfn-lambda-capacityprovider-capacityproviderscalingconfig-maxvcpucount)" : Integer,
  "[ScalingMode](#cfn-lambda-capacityprovider-capacityproviderscalingconfig-scalingmode)" : String,
  "[ScalingPolicies](#cfn-lambda-capacityprovider-capacityproviderscalingconfig-scalingpolicies)" : [ TargetTrackingScalingPolicy, ... ]
}
```

### YAML
<a name="aws-properties-lambda-capacityprovider-capacityproviderscalingconfig-syntax.yaml"></a>

```
  [MaxVCpuCount](#cfn-lambda-capacityprovider-capacityproviderscalingconfig-maxvcpucount): Integer
  [ScalingMode](#cfn-lambda-capacityprovider-capacityproviderscalingconfig-scalingmode): String
  [ScalingPolicies](#cfn-lambda-capacityprovider-capacityproviderscalingconfig-scalingpolicies): 
    - TargetTrackingScalingPolicy
```

## Properties
<a name="aws-properties-lambda-capacityprovider-capacityproviderscalingconfig-properties"></a>

`MaxVCpuCount`  <a name="cfn-lambda-capacityprovider-capacityproviderscalingconfig-maxvcpucount"></a>
The maximum number of vCPUs that the capacity provider can provision across all compute instances.  
*Required*: No  
*Type*: Integer  
*Minimum*: `2`  
*Maximum*: `15000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ScalingMode`  <a name="cfn-lambda-capacityprovider-capacityproviderscalingconfig-scalingmode"></a>
The scaling mode that determines how the capacity provider responds to changes in demand.  
*Required*: No  
*Type*: String  
*Allowed values*: `Auto | Manual`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ScalingPolicies`  <a name="cfn-lambda-capacityprovider-capacityproviderscalingconfig-scalingpolicies"></a>
A list of target tracking scaling policies for the capacity provider.  
*Required*: No  
*Type*: Array of [TargetTrackingScalingPolicy](aws-properties-lambda-capacityprovider-targettrackingscalingpolicy.md)  
*Minimum*: `1`  
*Maximum*: `10`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::CapacityProvider CapacityProviderVpcConfig
<a name="aws-properties-lambda-capacityprovider-capacityprovidervpcconfig"></a>

VPC configuration that specifies the network settings for compute instances managed by the capacity provider.

## Syntax
<a name="aws-properties-lambda-capacityprovider-capacityprovidervpcconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-capacityprovider-capacityprovidervpcconfig-syntax.json"></a>

```
{
  "[SecurityGroupIds](#cfn-lambda-capacityprovider-capacityprovidervpcconfig-securitygroupids)" : [ String, ... ],
  "[SubnetIds](#cfn-lambda-capacityprovider-capacityprovidervpcconfig-subnetids)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-lambda-capacityprovider-capacityprovidervpcconfig-syntax.yaml"></a>

```
  [SecurityGroupIds](#cfn-lambda-capacityprovider-capacityprovidervpcconfig-securitygroupids): 
    - String
  [SubnetIds](#cfn-lambda-capacityprovider-capacityprovidervpcconfig-subnetids): 
    - String
```

## Properties
<a name="aws-properties-lambda-capacityprovider-capacityprovidervpcconfig-properties"></a>

`SecurityGroupIds`  <a name="cfn-lambda-capacityprovider-capacityprovidervpcconfig-securitygroupids"></a>
A list of security group IDs that control network access for compute instances managed by the capacity provider.  
*Required*: Yes  
*Type*: Array of String  
*Minimum*: `0 | 0`  
*Maximum*: `1024 | 5`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SubnetIds`  <a name="cfn-lambda-capacityprovider-capacityprovidervpcconfig-subnetids"></a>
A list of subnet IDs where the capacity provider launches compute instances.  
*Required*: Yes  
*Type*: Array of String  
*Minimum*: `0 | 1`  
*Maximum*: `1024 | 16`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Lambda::CapacityProvider InstanceRequirements
<a name="aws-properties-lambda-capacityprovider-instancerequirements"></a>

Specifications that define the characteristics and constraints for compute instances used by the capacity provider.

## Syntax
<a name="aws-properties-lambda-capacityprovider-instancerequirements-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-capacityprovider-instancerequirements-syntax.json"></a>

```
{
  "[AllowedInstanceTypes](#cfn-lambda-capacityprovider-instancerequirements-allowedinstancetypes)" : [ String, ... ],
  "[Architectures](#cfn-lambda-capacityprovider-instancerequirements-architectures)" : [ String, ... ],
  "[ExcludedInstanceTypes](#cfn-lambda-capacityprovider-instancerequirements-excludedinstancetypes)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-lambda-capacityprovider-instancerequirements-syntax.yaml"></a>

```
  [AllowedInstanceTypes](#cfn-lambda-capacityprovider-instancerequirements-allowedinstancetypes): 
    - String
  [Architectures](#cfn-lambda-capacityprovider-instancerequirements-architectures): 
    - String
  [ExcludedInstanceTypes](#cfn-lambda-capacityprovider-instancerequirements-excludedinstancetypes): 
    - String
```

## Properties
<a name="aws-properties-lambda-capacityprovider-instancerequirements-properties"></a>

`AllowedInstanceTypes`  <a name="cfn-lambda-capacityprovider-instancerequirements-allowedinstancetypes"></a>
A list of EC2 instance types that the capacity provider is allowed to use. If not specified, all compatible instance types are allowed.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1 | 0`  
*Maximum*: `30 | 400`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Architectures`  <a name="cfn-lambda-capacityprovider-instancerequirements-architectures"></a>
A list of supported CPU architectures for compute instances. Valid values include `x86_64` and `arm64`.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1`  
*Maximum*: `1`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ExcludedInstanceTypes`  <a name="cfn-lambda-capacityprovider-instancerequirements-excludedinstancetypes"></a>
A list of EC2 instance types that the capacity provider should not use, even if they meet other requirements.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1 | 0`  
*Maximum*: `30 | 400`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Examples
<a name="aws-properties-lambda-capacityprovider-instancerequirements--examples"></a>

### Instance requirement configuration
<a name="aws-properties-lambda-capacityprovider-instancerequirements--examples--Instance_requirement_configuration"></a>

Configure instance types and architecture.

#### YAML
<a name="aws-properties-lambda-capacityprovider-instancerequirements--examples--Instance_requirement_configuration--yaml"></a>

```
      
InstanceRequirements:
    AllowedInstanceTypes:
        - c5.4xlarge
    ExcludedInstanceTypes:
        - r6g.xlarge
    Architecture:
        - x86_64
```

# AWS::Lambda::CapacityProvider Tag
<a name="aws-properties-lambda-capacityprovider-tag"></a>

A key-value pair that provides metadata for the capacity provider.

## Syntax
<a name="aws-properties-lambda-capacityprovider-tag-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-capacityprovider-tag-syntax.json"></a>

```
{
  "[Key](#cfn-lambda-capacityprovider-tag-key)" : String,
  "[Value](#cfn-lambda-capacityprovider-tag-value)" : String
}
```

### YAML
<a name="aws-properties-lambda-capacityprovider-tag-syntax.yaml"></a>

```
  [Key](#cfn-lambda-capacityprovider-tag-key): String
  [Value](#cfn-lambda-capacityprovider-tag-value): String
```

## Properties
<a name="aws-properties-lambda-capacityprovider-tag-properties"></a>

`Key`  <a name="cfn-lambda-capacityprovider-tag-key"></a>
The key name of the tag.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-lambda-capacityprovider-tag-value"></a>
The value for the tag.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::CapacityProvider TargetTrackingScalingPolicy
<a name="aws-properties-lambda-capacityprovider-targettrackingscalingpolicy"></a>

A scaling policy for the capacity provider that automatically adjusts capacity to maintain a target value for a specific metric.

## Syntax
<a name="aws-properties-lambda-capacityprovider-targettrackingscalingpolicy-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-capacityprovider-targettrackingscalingpolicy-syntax.json"></a>

```
{
  "[PredefinedMetricType](#cfn-lambda-capacityprovider-targettrackingscalingpolicy-predefinedmetrictype)" : String,
  "[TargetValue](#cfn-lambda-capacityprovider-targettrackingscalingpolicy-targetvalue)" : Number
}
```

### YAML
<a name="aws-properties-lambda-capacityprovider-targettrackingscalingpolicy-syntax.yaml"></a>

```
  [PredefinedMetricType](#cfn-lambda-capacityprovider-targettrackingscalingpolicy-predefinedmetrictype): String
  [TargetValue](#cfn-lambda-capacityprovider-targettrackingscalingpolicy-targetvalue): Number
```

## Properties
<a name="aws-properties-lambda-capacityprovider-targettrackingscalingpolicy-properties"></a>

`PredefinedMetricType`  <a name="cfn-lambda-capacityprovider-targettrackingscalingpolicy-predefinedmetrictype"></a>
The predefined metric type to track for scaling decisions.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `LambdaCapacityProviderAverageCPUUtilization`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetValue`  <a name="cfn-lambda-capacityprovider-targettrackingscalingpolicy-targetvalue"></a>
The target value for the metric that the scaling policy attempts to maintain through scaling actions.  
*Required*: Yes  
*Type*: Number  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::CodeSigningConfig
<a name="aws-resource-lambda-codesigningconfig"></a>

Details about a [Code signing configuration](https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html). 

## Syntax
<a name="aws-resource-lambda-codesigningconfig-syntax"></a>

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

### JSON
<a name="aws-resource-lambda-codesigningconfig-syntax.json"></a>

```
{
  "Type" : "AWS::Lambda::CodeSigningConfig",
  "Properties" : {
      "[AllowedPublishers](#cfn-lambda-codesigningconfig-allowedpublishers)" : AllowedPublishers,
      "[CodeSigningPolicies](#cfn-lambda-codesigningconfig-codesigningpolicies)" : CodeSigningPolicies,
      "[Description](#cfn-lambda-codesigningconfig-description)" : String,
      "[Tags](#cfn-lambda-codesigningconfig-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-lambda-codesigningconfig-syntax.yaml"></a>

```
Type: AWS::Lambda::CodeSigningConfig
Properties:
  [AllowedPublishers](#cfn-lambda-codesigningconfig-allowedpublishers): 
    AllowedPublishers
  [CodeSigningPolicies](#cfn-lambda-codesigningconfig-codesigningpolicies): 
    CodeSigningPolicies
  [Description](#cfn-lambda-codesigningconfig-description): String
  [Tags](#cfn-lambda-codesigningconfig-tags): 
    - Tag
```

## Properties
<a name="aws-resource-lambda-codesigningconfig-properties"></a>

`AllowedPublishers`  <a name="cfn-lambda-codesigningconfig-allowedpublishers"></a>
List of allowed publishers.  
*Required*: Yes  
*Type*: [AllowedPublishers](aws-properties-lambda-codesigningconfig-allowedpublishers.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CodeSigningPolicies`  <a name="cfn-lambda-codesigningconfig-codesigningpolicies"></a>
The code signing policy controls the validation failure action for signature mismatch or expiry.  
*Required*: No  
*Type*: [CodeSigningPolicies](aws-properties-lambda-codesigningconfig-codesigningpolicies.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Description`  <a name="cfn-lambda-codesigningconfig-description"></a>
Code signing configuration description.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-lambda-codesigningconfig-tags"></a>
A list of tags to add to the code signing configuration.  
You must have the `lambda:TagResource`, `lambda:UntagResource`, and `lambda:ListTags` permissions for your [IAM principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html) 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](aws-properties-lambda-codesigningconfig-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-lambda-codesigningconfig-return-values"></a>

### Ref
<a name="aws-resource-lambda-codesigningconfig-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the resource name.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-lambda-codesigningconfig-return-values-fn--getatt"></a>

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 [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-lambda-codesigningconfig-return-values-fn--getatt-fn--getatt"></a>

`CodeSigningConfigArn`  <a name="CodeSigningConfigArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the code signing configuration.

`CodeSigningConfigId`  <a name="CodeSigningConfigId-fn::getatt"></a>
The code signing configuration ID.

# AWS::Lambda::CodeSigningConfig AllowedPublishers
<a name="aws-properties-lambda-codesigningconfig-allowedpublishers"></a>

List of signing profiles that can sign a code package. 

## Syntax
<a name="aws-properties-lambda-codesigningconfig-allowedpublishers-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-codesigningconfig-allowedpublishers-syntax.json"></a>

```
{
  "[SigningProfileVersionArns](#cfn-lambda-codesigningconfig-allowedpublishers-signingprofileversionarns)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-lambda-codesigningconfig-allowedpublishers-syntax.yaml"></a>

```
  [SigningProfileVersionArns](#cfn-lambda-codesigningconfig-allowedpublishers-signingprofileversionarns): 
    - String
```

## Properties
<a name="aws-properties-lambda-codesigningconfig-allowedpublishers-properties"></a>

`SigningProfileVersionArns`  <a name="cfn-lambda-codesigningconfig-allowedpublishers-signingprofileversionarns"></a>
The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.   
*Required*: Yes  
*Type*: Array of String  
*Minimum*: `12 | 1`  
*Maximum*: `1024 | 20`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::CodeSigningConfig CodeSigningPolicies
<a name="aws-properties-lambda-codesigningconfig-codesigningpolicies"></a>

Code signing configuration [policies](https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html#config-codesigning-policies) specify the validation failure action for signature mismatch or expiry.

## Syntax
<a name="aws-properties-lambda-codesigningconfig-codesigningpolicies-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-codesigningconfig-codesigningpolicies-syntax.json"></a>

```
{
  "[UntrustedArtifactOnDeployment](#cfn-lambda-codesigningconfig-codesigningpolicies-untrustedartifactondeployment)" : String
}
```

### YAML
<a name="aws-properties-lambda-codesigningconfig-codesigningpolicies-syntax.yaml"></a>

```
  [UntrustedArtifactOnDeployment](#cfn-lambda-codesigningconfig-codesigningpolicies-untrustedartifactondeployment): String
```

## Properties
<a name="aws-properties-lambda-codesigningconfig-codesigningpolicies-properties"></a>

`UntrustedArtifactOnDeployment`  <a name="cfn-lambda-codesigningconfig-codesigningpolicies-untrustedartifactondeployment"></a>
Code signing configuration policy for deployment validation failure. If you set the policy to `Enforce`, Lambda blocks the deployment request if signature validation checks fail. If you set the policy to `Warn`, Lambda allows the deployment and issues a new Amazon CloudWatch metric (`SignatureValidationErrors`) and also stores the warning in the CloudTrail log.  
Default value: `Warn`  
*Required*: Yes  
*Type*: String  
*Allowed values*: `Warn | Enforce`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::CodeSigningConfig Tag
<a name="aws-properties-lambda-codesigningconfig-tag"></a>

A [tag](https://docs.aws.amazon.com/lambda/latest/dg/tagging.html) to apply to the code signing configuration.

## Syntax
<a name="aws-properties-lambda-codesigningconfig-tag-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-codesigningconfig-tag-syntax.json"></a>

```
{
  "[Key](#cfn-lambda-codesigningconfig-tag-key)" : String,
  "[Value](#cfn-lambda-codesigningconfig-tag-value)" : String
}
```

### YAML
<a name="aws-properties-lambda-codesigningconfig-tag-syntax.yaml"></a>

```
  [Key](#cfn-lambda-codesigningconfig-tag-key): String
  [Value](#cfn-lambda-codesigningconfig-tag-value): String
```

## Properties
<a name="aws-properties-lambda-codesigningconfig-tag-properties"></a>

`Key`  <a name="cfn-lambda-codesigningconfig-tag-key"></a>
The key for this tag.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-lambda-codesigningconfig-tag-value"></a>
The value for this tag.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventInvokeConfig
<a name="aws-resource-lambda-eventinvokeconfig"></a>

The `AWS::Lambda::EventInvokeConfig` resource configures options for [asynchronous invocation](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html) on a version or an alias.

By default, Lambda retries an asynchronous invocation twice if the function returns an error. It retains events in a queue for up to six hours. When an event fails all processing attempts or stays in the asynchronous invocation queue for too long, Lambda discards it.

## Syntax
<a name="aws-resource-lambda-eventinvokeconfig-syntax"></a>

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

### JSON
<a name="aws-resource-lambda-eventinvokeconfig-syntax.json"></a>

```
{
  "Type" : "AWS::Lambda::EventInvokeConfig",
  "Properties" : {
      "[DestinationConfig](#cfn-lambda-eventinvokeconfig-destinationconfig)" : DestinationConfig,
      "[FunctionName](#cfn-lambda-eventinvokeconfig-functionname)" : String,
      "[MaximumEventAgeInSeconds](#cfn-lambda-eventinvokeconfig-maximumeventageinseconds)" : Integer,
      "[MaximumRetryAttempts](#cfn-lambda-eventinvokeconfig-maximumretryattempts)" : Integer,
      "[Qualifier](#cfn-lambda-eventinvokeconfig-qualifier)" : String
    }
}
```

### YAML
<a name="aws-resource-lambda-eventinvokeconfig-syntax.yaml"></a>

```
Type: AWS::Lambda::EventInvokeConfig
Properties:
  [DestinationConfig](#cfn-lambda-eventinvokeconfig-destinationconfig): 
    DestinationConfig
  [FunctionName](#cfn-lambda-eventinvokeconfig-functionname): String
  [MaximumEventAgeInSeconds](#cfn-lambda-eventinvokeconfig-maximumeventageinseconds): Integer
  [MaximumRetryAttempts](#cfn-lambda-eventinvokeconfig-maximumretryattempts): Integer
  [Qualifier](#cfn-lambda-eventinvokeconfig-qualifier): String
```

## Properties
<a name="aws-resource-lambda-eventinvokeconfig-properties"></a>

`DestinationConfig`  <a name="cfn-lambda-eventinvokeconfig-destinationconfig"></a>
A destination for events after they have been sent to a function for processing.  

**Destinations**
+ **Function** - The Amazon Resource Name (ARN) of a Lambda function.
+ **Queue** - The ARN of a standard SQS queue.
+ **Bucket** - The ARN of an Amazon S3 bucket.
+ **Topic** - The ARN of a standard SNS topic.
+ **Event Bus** - The ARN of an Amazon EventBridge event bus.
S3 buckets are supported only for on-failure destinations. To retain records of successful invocations, use another destination type.
*Required*: No  
*Type*: [DestinationConfig](aws-properties-lambda-eventinvokeconfig-destinationconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FunctionName`  <a name="cfn-lambda-eventinvokeconfig-functionname"></a>
The name of the Lambda function.  
*Minimum*: `1`  
*Maximum*: `64`  
*Pattern*: `([a-zA-Z0-9-_]+)`  
*Required*: Yes  
*Type*: String  
*Pattern*: `^(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]+(-[a-z]+)+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST(\.PUBLISHED)?|[a-zA-Z0-9-_]+))?$`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MaximumEventAgeInSeconds`  <a name="cfn-lambda-eventinvokeconfig-maximumeventageinseconds"></a>
The maximum age of a request that Lambda sends to a function for processing.  
*Required*: No  
*Type*: Integer  
*Minimum*: `60`  
*Maximum*: `21600`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaximumRetryAttempts`  <a name="cfn-lambda-eventinvokeconfig-maximumretryattempts"></a>
The maximum number of times to retry when the function returns an error.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `2`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Qualifier`  <a name="cfn-lambda-eventinvokeconfig-qualifier"></a>
The identifier of a version or alias.  
+ **Version** - A version number.
+ **Alias** - An alias name.
+ **Latest** - To specify the unpublished version, use `$LATEST`.
*Required*: Yes  
*Type*: String  
*Pattern*: `^\$(LATEST(\.PUBLISHED)?)|[a-zA-Z0-9$_-]{1,129}$`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-lambda-eventinvokeconfig-return-values"></a>

### Ref
<a name="aws-resource-lambda-eventinvokeconfig-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns a unique identifier for this resource.

## Examples
<a name="aws-resource-lambda-eventinvokeconfig--examples"></a>



### Asynchronous Invocation Configuration
<a name="aws-resource-lambda-eventinvokeconfig--examples--Asynchronous_Invocation_Configuration"></a>

Error handling and destination configuration for a version of a function. Node.js function and version are included.

#### YAML
<a name="aws-resource-lambda-eventinvokeconfig--examples--Asynchronous_Invocation_Configuration--yaml"></a>

```
Resources:
  function:
    Type: AWS::Lambda::Function
    Properties:
      Handler: index.handler
      Role: arn:aws:iam::123456789012:role/lambda-role
      Code:
        ZipFile: |
          exports.handler = async (event) => {
              console.log(JSON.stringify(event, null, 2));
              const response = {
                  statusCode: 200,
                  body: JSON.stringify('Hello from Lambda!'),
              };
              return response;
          };
      Runtime: nodejs18.x
      TracingConfig:
        Mode: Active
  version:
    Type: AWS::Lambda::Version
    Properties:
      FunctionName: !Ref function
  asyncconfig:
    Type: AWS::Lambda::EventInvokeConfig
    Properties:
      DestinationConfig:
          OnFailure:
            Destination: arn:aws:sqs:us-east-2:123456789012:dlq
          OnSuccess:
            Destination: arn:aws:sqs:us-east-2:123456789012:dlq
      FunctionName: !Ref function
      MaximumEventAgeInSeconds: 300
      MaximumRetryAttempts: 1
      Qualifier: !GetAtt version.Version
```

# AWS::Lambda::EventInvokeConfig DestinationConfig
<a name="aws-properties-lambda-eventinvokeconfig-destinationconfig"></a>

A configuration object that specifies the destination of an event after Lambda processes it. For more information, see [Adding a destination](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations).

## Syntax
<a name="aws-properties-lambda-eventinvokeconfig-destinationconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventinvokeconfig-destinationconfig-syntax.json"></a>

```
{
  "[OnFailure](#cfn-lambda-eventinvokeconfig-destinationconfig-onfailure)" : OnFailure,
  "[OnSuccess](#cfn-lambda-eventinvokeconfig-destinationconfig-onsuccess)" : OnSuccess
}
```

### YAML
<a name="aws-properties-lambda-eventinvokeconfig-destinationconfig-syntax.yaml"></a>

```
  [OnFailure](#cfn-lambda-eventinvokeconfig-destinationconfig-onfailure): 
    OnFailure
  [OnSuccess](#cfn-lambda-eventinvokeconfig-destinationconfig-onsuccess): 
    OnSuccess
```

## Properties
<a name="aws-properties-lambda-eventinvokeconfig-destinationconfig-properties"></a>

`OnFailure`  <a name="cfn-lambda-eventinvokeconfig-destinationconfig-onfailure"></a>
The destination configuration for failed invocations.  
When using an Amazon SQS queue as a destination, FIFO queues cannot be used.
*Required*: No  
*Type*: [OnFailure](aws-properties-lambda-eventinvokeconfig-onfailure.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OnSuccess`  <a name="cfn-lambda-eventinvokeconfig-destinationconfig-onsuccess"></a>
The destination configuration for successful invocations.  
When using an Amazon SQS queue as a destination, FIFO queues cannot be used.
*Required*: No  
*Type*: [OnSuccess](aws-properties-lambda-eventinvokeconfig-onsuccess.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-lambda-eventinvokeconfig-destinationconfig--examples"></a>



### On-Failure Destination Configuration
<a name="aws-properties-lambda-eventinvokeconfig-destinationconfig--examples--On-Failure_Destination_Configuration"></a>

Configure a function to send a record of failed asynchronous invocations to an SQS queue.

#### YAML
<a name="aws-properties-lambda-eventinvokeconfig-destinationconfig--examples--On-Failure_Destination_Configuration--yaml"></a>

```
      DestinationConfig:
          OnFailure:
            Destination: arn:aws:sqs:us-east-2:123456789012:dlq
```

# AWS::Lambda::EventInvokeConfig OnFailure
<a name="aws-properties-lambda-eventinvokeconfig-onfailure"></a>

A destination for events that failed processing. For more information, see [Adding a destination](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations).

## Syntax
<a name="aws-properties-lambda-eventinvokeconfig-onfailure-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventinvokeconfig-onfailure-syntax.json"></a>

```
{
  "[Destination](#cfn-lambda-eventinvokeconfig-onfailure-destination)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventinvokeconfig-onfailure-syntax.yaml"></a>

```
  [Destination](#cfn-lambda-eventinvokeconfig-onfailure-destination): String
```

## Properties
<a name="aws-properties-lambda-eventinvokeconfig-onfailure-properties"></a>

`Destination`  <a name="cfn-lambda-eventinvokeconfig-onfailure-destination"></a>
The Amazon Resource Name (ARN) of the destination resource.  
To retain records of failed invocations from [Kinesis](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html), [DynamoDB](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html), [self-managed Apache Kafka](https://docs.aws.amazon.com/lambda/latest/dg/kafka-on-failure.html), or [Amazon MSK](https://docs.aws.amazon.com/lambda/latest/dg/kafka-on-failure.html), you can configure an Amazon SNS topic, Amazon SQS queue, Amazon S3 bucket, or Kafka topic as the destination.  
Amazon SNS destinations have a message size limit of 256 KB. If the combined size of the function request and response payload exceeds the limit, Lambda will drop the payload when sending `OnFailure` event to the destination. For details on this behavior, refer to [Retaining records of asynchronous invocations](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html).
To retain records of failed invocations from [Kinesis](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html), [DynamoDB](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html), [self-managed Kafka](https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-smaa-onfailure-destination) or [Amazon MSK](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-onfailure-destination), you can configure an Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^$|arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:([a-z]+(-[a-z]+)+-\d{1})?:(\d{12})?:(.*)`  
*Minimum*: `0`  
*Maximum*: `350`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-lambda-eventinvokeconfig-onfailure--examples"></a>



### On-Failure Destination Configuration
<a name="aws-properties-lambda-eventinvokeconfig-onfailure--examples--On-Failure_Destination_Configuration"></a>

Configure a function to send a record of failed asynchronous invocations to an SQS queue.

#### YAML
<a name="aws-properties-lambda-eventinvokeconfig-onfailure--examples--On-Failure_Destination_Configuration--yaml"></a>

```
          OnFailure:
            Destination: arn:aws:sqs:us-east-2:123456789012:dlq
```

# AWS::Lambda::EventInvokeConfig OnSuccess
<a name="aws-properties-lambda-eventinvokeconfig-onsuccess"></a>

A destination for events that were processed successfully.

To retain records of successful [asynchronous invocations](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations), you can configure an Amazon SNS topic, Amazon SQS queue, Lambda function, or Amazon EventBridge event bus as the destination.

**Note**  
`OnSuccess` is not supported in `CreateEventSourceMapping` or `UpdateEventSourceMapping` requests.

## Syntax
<a name="aws-properties-lambda-eventinvokeconfig-onsuccess-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventinvokeconfig-onsuccess-syntax.json"></a>

```
{
  "[Destination](#cfn-lambda-eventinvokeconfig-onsuccess-destination)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventinvokeconfig-onsuccess-syntax.yaml"></a>

```
  [Destination](#cfn-lambda-eventinvokeconfig-onsuccess-destination): String
```

## Properties
<a name="aws-properties-lambda-eventinvokeconfig-onsuccess-properties"></a>

`Destination`  <a name="cfn-lambda-eventinvokeconfig-onsuccess-destination"></a>
The Amazon Resource Name (ARN) of the destination resource.  
Amazon SNS destinations have a message size limit of 256 KB. If the combined size of the function request and response payload exceeds the limit, Lambda will drop the payload when sending `OnFailure` event to the destination. For details on this behavior, refer to [Retaining records of asynchronous invocations](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html).
*Required*: Yes  
*Type*: String  
*Pattern*: `^$|arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:([a-z]+(-[a-z]+)+-\d{1})?:(\d{12})?:(.*)`  
*Minimum*: `0`  
*Maximum*: `350`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-lambda-eventinvokeconfig-onsuccess--examples"></a>



### On-Success Destination Configuration
<a name="aws-properties-lambda-eventinvokeconfig-onsuccess--examples--On-Success_Destination_Configuration"></a>

Configure a function to send a record of successful asynchronous invocations to an SQS queue.

#### YAML
<a name="aws-properties-lambda-eventinvokeconfig-onsuccess--examples--On-Success_Destination_Configuration--yaml"></a>

```
          OnSuccess:
            Destination: arn:aws:sqs:us-east-2:123456789012:destination
```

# AWS::Lambda::EventSourceMapping
<a name="aws-resource-lambda-eventsourcemapping"></a>

The `AWS::Lambda::EventSourceMapping` resource creates a mapping between an event source and an AWS Lambda function. Lambda reads items from the event source and triggers the function.

For details about each event source type, see the following topics. In particular, each of the topics describes the required and optional parameters for the specific event source. 
+  [ Configuring a Dynamo DB stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-dynamodb-eventsourcemapping) 
+  [ Configuring a Kinesis stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-eventsourcemapping) 
+  [ Configuring an SQS queue as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-eventsource) 
+  [ Configuring an MQ broker as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-eventsourcemapping) 
+  [ Configuring MSK as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html) 
+  [ Configuring Self-Managed Apache Kafka as an event source](https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html) 
+  [ Configuring Amazon DocumentDB as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html) 

## Syntax
<a name="aws-resource-lambda-eventsourcemapping-syntax"></a>

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

### JSON
<a name="aws-resource-lambda-eventsourcemapping-syntax.json"></a>

```
{
  "Type" : "AWS::Lambda::EventSourceMapping",
  "Properties" : {
      "[AmazonManagedKafkaEventSourceConfig](#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig)" : AmazonManagedKafkaEventSourceConfig,
      "[BatchSize](#cfn-lambda-eventsourcemapping-batchsize)" : Integer,
      "[BisectBatchOnFunctionError](#cfn-lambda-eventsourcemapping-bisectbatchonfunctionerror)" : Boolean,
      "[DestinationConfig](#cfn-lambda-eventsourcemapping-destinationconfig)" : DestinationConfig,
      "[DocumentDBEventSourceConfig](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig)" : DocumentDBEventSourceConfig,
      "[Enabled](#cfn-lambda-eventsourcemapping-enabled)" : Boolean,
      "[EventSourceArn](#cfn-lambda-eventsourcemapping-eventsourcearn)" : String,
      "[FilterCriteria](#cfn-lambda-eventsourcemapping-filtercriteria)" : FilterCriteria,
      "[FunctionName](#cfn-lambda-eventsourcemapping-functionname)" : String,
      "[FunctionResponseTypes](#cfn-lambda-eventsourcemapping-functionresponsetypes)" : [ String, ... ],
      "[KmsKeyArn](#cfn-lambda-eventsourcemapping-kmskeyarn)" : String,
      "[LoggingConfig](#cfn-lambda-eventsourcemapping-loggingconfig)" : LoggingConfig,
      "[MaximumBatchingWindowInSeconds](#cfn-lambda-eventsourcemapping-maximumbatchingwindowinseconds)" : Integer,
      "[MaximumRecordAgeInSeconds](#cfn-lambda-eventsourcemapping-maximumrecordageinseconds)" : Integer,
      "[MaximumRetryAttempts](#cfn-lambda-eventsourcemapping-maximumretryattempts)" : Integer,
      "[MetricsConfig](#cfn-lambda-eventsourcemapping-metricsconfig)" : MetricsConfig,
      "[ParallelizationFactor](#cfn-lambda-eventsourcemapping-parallelizationfactor)" : Integer,
      "[ProvisionedPollerConfig](#cfn-lambda-eventsourcemapping-provisionedpollerconfig)" : ProvisionedPollerConfig,
      "[Queues](#cfn-lambda-eventsourcemapping-queues)" : [ String, ... ],
      "[ScalingConfig](#cfn-lambda-eventsourcemapping-scalingconfig)" : ScalingConfig,
      "[SelfManagedEventSource](#cfn-lambda-eventsourcemapping-selfmanagedeventsource)" : SelfManagedEventSource,
      "[SelfManagedKafkaEventSourceConfig](#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig)" : SelfManagedKafkaEventSourceConfig,
      "[SourceAccessConfigurations](#cfn-lambda-eventsourcemapping-sourceaccessconfigurations)" : [ SourceAccessConfiguration, ... ],
      "[StartingPosition](#cfn-lambda-eventsourcemapping-startingposition)" : String,
      "[StartingPositionTimestamp](#cfn-lambda-eventsourcemapping-startingpositiontimestamp)" : Number,
      "[Tags](#cfn-lambda-eventsourcemapping-tags)" : [ Tag, ... ],
      "[Topics](#cfn-lambda-eventsourcemapping-topics)" : [ String, ... ],
      "[TumblingWindowInSeconds](#cfn-lambda-eventsourcemapping-tumblingwindowinseconds)" : Integer
    }
}
```

### YAML
<a name="aws-resource-lambda-eventsourcemapping-syntax.yaml"></a>

```
Type: AWS::Lambda::EventSourceMapping
Properties:
  [AmazonManagedKafkaEventSourceConfig](#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig): 
    AmazonManagedKafkaEventSourceConfig
  [BatchSize](#cfn-lambda-eventsourcemapping-batchsize): Integer
  [BisectBatchOnFunctionError](#cfn-lambda-eventsourcemapping-bisectbatchonfunctionerror): Boolean
  [DestinationConfig](#cfn-lambda-eventsourcemapping-destinationconfig): 
    DestinationConfig
  [DocumentDBEventSourceConfig](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig): 
    DocumentDBEventSourceConfig
  [Enabled](#cfn-lambda-eventsourcemapping-enabled): Boolean
  [EventSourceArn](#cfn-lambda-eventsourcemapping-eventsourcearn): String
  [FilterCriteria](#cfn-lambda-eventsourcemapping-filtercriteria): 
    FilterCriteria
  [FunctionName](#cfn-lambda-eventsourcemapping-functionname): String
  [FunctionResponseTypes](#cfn-lambda-eventsourcemapping-functionresponsetypes): 
    - String
  [KmsKeyArn](#cfn-lambda-eventsourcemapping-kmskeyarn): String
  [LoggingConfig](#cfn-lambda-eventsourcemapping-loggingconfig): 
    LoggingConfig
  [MaximumBatchingWindowInSeconds](#cfn-lambda-eventsourcemapping-maximumbatchingwindowinseconds): Integer
  [MaximumRecordAgeInSeconds](#cfn-lambda-eventsourcemapping-maximumrecordageinseconds): Integer
  [MaximumRetryAttempts](#cfn-lambda-eventsourcemapping-maximumretryattempts): Integer
  [MetricsConfig](#cfn-lambda-eventsourcemapping-metricsconfig): 
    MetricsConfig
  [ParallelizationFactor](#cfn-lambda-eventsourcemapping-parallelizationfactor): Integer
  [ProvisionedPollerConfig](#cfn-lambda-eventsourcemapping-provisionedpollerconfig): 
    ProvisionedPollerConfig
  [Queues](#cfn-lambda-eventsourcemapping-queues): 
    - String
  [ScalingConfig](#cfn-lambda-eventsourcemapping-scalingconfig): 
    ScalingConfig
  [SelfManagedEventSource](#cfn-lambda-eventsourcemapping-selfmanagedeventsource): 
    SelfManagedEventSource
  [SelfManagedKafkaEventSourceConfig](#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig): 
    SelfManagedKafkaEventSourceConfig
  [SourceAccessConfigurations](#cfn-lambda-eventsourcemapping-sourceaccessconfigurations): 
    - SourceAccessConfiguration
  [StartingPosition](#cfn-lambda-eventsourcemapping-startingposition): String
  [StartingPositionTimestamp](#cfn-lambda-eventsourcemapping-startingpositiontimestamp): Number
  [Tags](#cfn-lambda-eventsourcemapping-tags): 
    - Tag
  [Topics](#cfn-lambda-eventsourcemapping-topics): 
    - String
  [TumblingWindowInSeconds](#cfn-lambda-eventsourcemapping-tumblingwindowinseconds): Integer
```

## Properties
<a name="aws-resource-lambda-eventsourcemapping-properties"></a>

`AmazonManagedKafkaEventSourceConfig`  <a name="cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig"></a>
Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.  
*Required*: No  
*Type*: [AmazonManagedKafkaEventSourceConfig](aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BatchSize`  <a name="cfn-lambda-eventsourcemapping-batchsize"></a>
The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).  
+ **Amazon Kinesis** – Default 100. Max 10,000.
+ **Amazon DynamoDB Streams** – Default 100. Max 10,000.
+ **Amazon Simple Queue Service** – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.
+ **Amazon Managed Streaming for Apache Kafka** – Default 100. Max 10,000.
+ **Self-managed Apache Kafka** – Default 100. Max 10,000.
+ **Amazon MQ (ActiveMQ and RabbitMQ)** – Default 100. Max 10,000.
+ **DocumentDB** – Default 100. Max 10,000.
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `10000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BisectBatchOnFunctionError`  <a name="cfn-lambda-eventsourcemapping-bisectbatchonfunctionerror"></a>
(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. The default value is false.  
When using `BisectBatchOnFunctionError`, check the `BatchSize` parameter in the `OnFailure` destination message's metadata. The `BatchSize` could be greater than 1 since Lambda consolidates failed messages metadata when writing to the `OnFailure` destination.
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DestinationConfig`  <a name="cfn-lambda-eventsourcemapping-destinationconfig"></a>
(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) A configuration object that specifies the destination of an event after Lambda processes it.  
*Required*: No  
*Type*: [DestinationConfig](aws-properties-lambda-eventsourcemapping-destinationconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DocumentDBEventSourceConfig`  <a name="cfn-lambda-eventsourcemapping-documentdbeventsourceconfig"></a>
Specific configuration settings for a DocumentDB event source.  
*Required*: No  
*Type*: [DocumentDBEventSourceConfig](aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Enabled`  <a name="cfn-lambda-eventsourcemapping-enabled"></a>
When true, the event source mapping is active. When false, Lambda pauses polling and invocation.  
Default: True  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EventSourceArn`  <a name="cfn-lambda-eventsourcemapping-eventsourcearn"></a>
The Amazon Resource Name (ARN) of the event source.  
+ **Amazon Kinesis** – The ARN of the data stream or a stream consumer.
+ **Amazon DynamoDB Streams** – The ARN of the stream.
+ **Amazon Simple Queue Service** – The ARN of the queue.
+ **Amazon Managed Streaming for Apache Kafka** – The ARN of the cluster or the ARN of the VPC connection (for [cross-account event source mappings](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc)).
+ **Amazon MQ** – The ARN of the broker.
+ **Amazon DocumentDB** – The ARN of the DocumentDB change stream.
*Required*: No  
*Type*: String  
*Pattern*: `arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1})?:(\d{12})?:(.*)`  
*Minimum*: `12`  
*Maximum*: `1024`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FilterCriteria`  <a name="cfn-lambda-eventsourcemapping-filtercriteria"></a>
An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see [Lambda event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html).  
*Required*: No  
*Type*: [FilterCriteria](aws-properties-lambda-eventsourcemapping-filtercriteria.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FunctionName`  <a name="cfn-lambda-eventsourcemapping-functionname"></a>
The name or ARN of the Lambda function.  

**Name formats**
+ **Function name** – `MyFunction`.
+ **Function ARN** – `arn:aws:lambda:us-west-2:123456789012:function:MyFunction`.
+ **Version or Alias ARN** – `arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD`.
+ **Partial ARN** – `123456789012:function:MyFunction`.
The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.  
*Required*: Yes  
*Type*: String  
*Pattern*: `(arn:(aws[a-zA-Z-]*)?:lambda:)?((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST(\.PUBLISHED)?|[a-zA-Z0-9-_]+))?`  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FunctionResponseTypes`  <a name="cfn-lambda-eventsourcemapping-functionresponsetypes"></a>
(Kinesis, DynamoDB Streams, and SQS) A list of current response type enums applied to the event source mapping.  
Valid Values: `ReportBatchItemFailures`  
*Required*: No  
*Type*: Array of String  
*Allowed values*: `ReportBatchItemFailures`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KmsKeyArn`  <a name="cfn-lambda-eventsourcemapping-kmskeyarn"></a>
 The ARN of the AWS Key Management Service (AWS KMS) customer managed key that Lambda uses to encrypt your function's [filter criteria](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics).  
*Required*: No  
*Type*: String  
*Pattern*: `(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()`  
*Minimum*: `12`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LoggingConfig`  <a name="cfn-lambda-eventsourcemapping-loggingconfig"></a>
(Amazon MSK, and self-managed Apache Kafka only) The logging configuration for your event source. For more information, see [Event source mapping logging](https://docs.aws.amazon.com/lambda/latest/dg/esm-logging.html).  
*Required*: No  
*Type*: [LoggingConfig](aws-properties-lambda-eventsourcemapping-loggingconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaximumBatchingWindowInSeconds`  <a name="cfn-lambda-eventsourcemapping-maximumbatchingwindowinseconds"></a>
The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.  
**Default (Kinesis, DynamoDB, Amazon SQS event sources)**: 0  
**Default (Amazon MSK, Kafka, Amazon MQ, Amazon DocumentDB event sources)**: 500 ms  
**Related setting: ** For Amazon SQS event sources, when you set `BatchSize` to a value greater than 10, you must set `MaximumBatchingWindowInSeconds` to at least 1.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `300`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaximumRecordAgeInSeconds`  <a name="cfn-lambda-eventsourcemapping-maximumrecordageinseconds"></a>
(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.  
The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter's absolute range, they are not allowed
*Required*: No  
*Type*: Integer  
*Minimum*: `-1`  
*Maximum*: `604800`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaximumRetryAttempts`  <a name="cfn-lambda-eventsourcemapping-maximumretryattempts"></a>
(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.  
*Required*: No  
*Type*: Integer  
*Minimum*: `-1`  
*Maximum*: `10000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricsConfig`  <a name="cfn-lambda-eventsourcemapping-metricsconfig"></a>
The metrics configuration for your event source. For more information, see [Event source mapping metrics](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics).  
*Required*: No  
*Type*: [MetricsConfig](aws-properties-lambda-eventsourcemapping-metricsconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ParallelizationFactor`  <a name="cfn-lambda-eventsourcemapping-parallelizationfactor"></a>
(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `10`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ProvisionedPollerConfig`  <a name="cfn-lambda-eventsourcemapping-provisionedpollerconfig"></a>
(Amazon SQS, Amazon MSK, and self-managed Apache Kafka only) The provisioned mode configuration for the event source. For more information, see [provisioned mode](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode).  
*Required*: No  
*Type*: [ProvisionedPollerConfig](aws-properties-lambda-eventsourcemapping-provisionedpollerconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Queues`  <a name="cfn-lambda-eventsourcemapping-queues"></a>
 (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1 | 1`  
*Maximum*: `1000 | 1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ScalingConfig`  <a name="cfn-lambda-eventsourcemapping-scalingconfig"></a>
This property is for Amazon SQS event sources only. You cannot use `ProvisionedPollerConfig` while using `ScalingConfig`. These options are mutually exclusive. To remove the scaling configuration, pass an empty value.  
*Required*: No  
*Type*: [ScalingConfig](aws-properties-lambda-eventsourcemapping-scalingconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SelfManagedEventSource`  <a name="cfn-lambda-eventsourcemapping-selfmanagedeventsource"></a>
The self-managed Apache Kafka cluster for your event source.  
*Required*: No  
*Type*: [SelfManagedEventSource](aws-properties-lambda-eventsourcemapping-selfmanagedeventsource.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SelfManagedKafkaEventSourceConfig`  <a name="cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig"></a>
Specific configuration settings for a self-managed Apache Kafka event source.  
*Required*: No  
*Type*: [SelfManagedKafkaEventSourceConfig](aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SourceAccessConfigurations`  <a name="cfn-lambda-eventsourcemapping-sourceaccessconfigurations"></a>
An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.  
*Required*: No  
*Type*: Array of [SourceAccessConfiguration](aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.md)  
*Minimum*: `1`  
*Maximum*: `22`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StartingPosition`  <a name="cfn-lambda-eventsourcemapping-startingposition"></a>
The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB.  
+ **LATEST** - Read only new records.
+ **TRIM\$1HORIZON** - Process all available records.
+ **AT\$1TIMESTAMP** - Specify a time from which to start reading records.
*Required*: No  
*Type*: String  
*Pattern*: `(LATEST|TRIM_HORIZON|AT_TIMESTAMP)+`  
*Minimum*: `6`  
*Maximum*: `12`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StartingPositionTimestamp`  <a name="cfn-lambda-eventsourcemapping-startingpositiontimestamp"></a>
With `StartingPosition` set to `AT_TIMESTAMP`, the time from which to start reading, in Unix time seconds. `StartingPositionTimestamp` cannot be in the future.  
*Required*: No  
*Type*: Number  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-lambda-eventsourcemapping-tags"></a>
A list of tags to add to the event source mapping.  
You must have the `lambda:TagResource`, `lambda:UntagResource`, and `lambda:ListTags` permissions for your [IAM principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html) 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](aws-properties-lambda-eventsourcemapping-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Topics`  <a name="cfn-lambda-eventsourcemapping-topics"></a>
The name of the Kafka topic.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1 | 1`  
*Maximum*: `249 | 1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TumblingWindowInSeconds`  <a name="cfn-lambda-eventsourcemapping-tumblingwindowinseconds"></a>
(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `900`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-lambda-eventsourcemapping-return-values"></a>

### Ref
<a name="aws-resource-lambda-eventsourcemapping-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the mapping's ID.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-lambda-eventsourcemapping-return-values-fn--getatt"></a>

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 [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-lambda-eventsourcemapping-return-values-fn--getatt-fn--getatt"></a>

`EventSourceMappingArn`  <a name="EventSourceMappingArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the event source mapping.

`Id`  <a name="Id-fn::getatt"></a>
The event source mapping's ID.

## Examples
<a name="aws-resource-lambda-eventsourcemapping--examples"></a>



### Event Source Mapping
<a name="aws-resource-lambda-eventsourcemapping--examples--Event_Source_Mapping"></a>

Create an event source mapping that reads events from Amazon Kinesis and invokes a Lambda function in the same template.

#### JSON
<a name="aws-resource-lambda-eventsourcemapping--examples--Event_Source_Mapping--json"></a>

```
"EventSourceMapping": {
    "Type": "AWS::Lambda::EventSourceMapping",
    "Properties": {
        "EventSourceArn": {
            "Fn::Join": [
                "",
                [
                    "arn:aws:kinesis:",
                    {
                        "Ref": "AWS::Region"
                    },
                    ":",
                    {
                        "Ref": "AWS::AccountId"
                    },
                    ":stream/",
                    {
                        "Ref": "KinesisStream"
                    }
                ]
            ]
        },
        "FunctionName": {
            "Fn::GetAtt": [
                "LambdaFunction",
                "Arn"
            ]
        },
        "StartingPosition": "TRIM_HORIZON"
    }
}
```

#### YAML
<a name="aws-resource-lambda-eventsourcemapping--examples--Event_Source_Mapping--yaml"></a>

```
MyEventSourceMapping:
  Type: AWS::Lambda::EventSourceMapping
  Properties:
    EventSourceArn:
      Fn::Join:
        - ""
        -
          - "arn:aws:kinesis:"
          -
            Ref: "AWS::Region"
          - ":"
          -
            Ref: "AWS::AccountId"
          - ":stream/"
          -
            Ref: "KinesisStream"
    FunctionName:
      Fn::GetAtt:
        - "LambdaFunction"
        - "Arn"
    StartingPosition: "TRIM_HORIZON"
```

# AWS::Lambda::EventSourceMapping AmazonManagedKafkaEventSourceConfig
<a name="aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig"></a>

Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-syntax.json"></a>

```
{
  "[ConsumerGroupId](#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-consumergroupid)" : String,
  "[SchemaRegistryConfig](#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-schemaregistryconfig)" : SchemaRegistryConfig
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-syntax.yaml"></a>

```
  [ConsumerGroupId](#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-consumergroupid): String
  [SchemaRegistryConfig](#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-schemaregistryconfig): 
    SchemaRegistryConfig
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-properties"></a>

`ConsumerGroupId`  <a name="cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-consumergroupid"></a>
The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see [Customizable consumer group ID](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id).  
*Required*: No  
*Type*: String  
*Pattern*: `[a-zA-Z0-9-\/*:_+=.@-]*`  
*Minimum*: `1`  
*Maximum*: `200`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SchemaRegistryConfig`  <a name="cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-schemaregistryconfig"></a>
Specific configuration settings for a Kafka schema registry.  
*Required*: No  
*Type*: [SchemaRegistryConfig](aws-properties-lambda-eventsourcemapping-schemaregistryconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping DestinationConfig
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig"></a>

A configuration object that specifies the destination of an event after Lambda processes it. For more information, see [Adding a destination](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations).

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig-syntax.json"></a>

```
{
  "[OnFailure](#cfn-lambda-eventsourcemapping-destinationconfig-onfailure)" : OnFailure
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig-syntax.yaml"></a>

```
  [OnFailure](#cfn-lambda-eventsourcemapping-destinationconfig-onfailure): 
    OnFailure
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig-properties"></a>

`OnFailure`  <a name="cfn-lambda-eventsourcemapping-destinationconfig-onfailure"></a>
The destination configuration for failed invocations.  
*Required*: No  
*Type*: [OnFailure](aws-properties-lambda-eventsourcemapping-onfailure.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig--examples"></a>



### On-Failure Destination Configuration
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig--examples--On-Failure_Destination_Configuration"></a>

Configure a function to send a record of failed batches to an SQS queue.

#### YAML
<a name="aws-properties-lambda-eventsourcemapping-destinationconfig--examples--On-Failure_Destination_Configuration--yaml"></a>

```
      DestinationConfig:
          OnFailure:
            Destination: arn:aws:sqs:us-east-2:123456789012:dlq
```

# AWS::Lambda::EventSourceMapping DocumentDBEventSourceConfig
<a name="aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig"></a>

 Specific configuration settings for a DocumentDB event source. 

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig-syntax.json"></a>

```
{
  "[CollectionName](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-collectionname)" : String,
  "[DatabaseName](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-databasename)" : String,
  "[FullDocument](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-fulldocument)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig-syntax.yaml"></a>

```
  [CollectionName](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-collectionname): String
  [DatabaseName](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-databasename): String
  [FullDocument](#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-fulldocument): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig-properties"></a>

`CollectionName`  <a name="cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-collectionname"></a>
 The name of the collection to consume within the database. If you do not specify a collection, Lambda consumes all collections.   
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `57`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DatabaseName`  <a name="cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-databasename"></a>
 The name of the database to consume within the DocumentDB cluster.   
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FullDocument`  <a name="cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-fulldocument"></a>
 Determines what DocumentDB sends to your event stream during document update operations. If set to UpdateLookup, DocumentDB sends a delta describing the changes, along with a copy of the entire document. Otherwise, DocumentDB sends only a partial document that contains the changes.   
*Required*: No  
*Type*: String  
*Allowed values*: `UpdateLookup | Default`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping Endpoints
<a name="aws-properties-lambda-eventsourcemapping-endpoints"></a>

The list of bootstrap servers for your Kafka brokers in the following format: `"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]`.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-endpoints-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-endpoints-syntax.json"></a>

```
{
  "[KafkaBootstrapServers](#cfn-lambda-eventsourcemapping-endpoints-kafkabootstrapservers)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-endpoints-syntax.yaml"></a>

```
  [KafkaBootstrapServers](#cfn-lambda-eventsourcemapping-endpoints-kafkabootstrapservers): 
    - String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-endpoints-properties"></a>

`KafkaBootstrapServers`  <a name="cfn-lambda-eventsourcemapping-endpoints-kafkabootstrapservers"></a>
The list of bootstrap servers for your Kafka brokers in the following format: `"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]`.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1 | 1`  
*Maximum*: `300 | 10`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Lambda::EventSourceMapping Filter
<a name="aws-properties-lambda-eventsourcemapping-filter"></a>

 A structure within a `FilterCriteria` object that defines an event filtering pattern. 

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-filter-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-filter-syntax.json"></a>

```
{
  "[Pattern](#cfn-lambda-eventsourcemapping-filter-pattern)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-filter-syntax.yaml"></a>

```
  [Pattern](#cfn-lambda-eventsourcemapping-filter-pattern): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-filter-properties"></a>

`Pattern`  <a name="cfn-lambda-eventsourcemapping-filter-pattern"></a>
 A filter pattern. For more information on the syntax of a filter pattern, see [ Filter rule syntax](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-syntax).   
*Required*: No  
*Type*: String  
*Pattern*: `.*`  
*Minimum*: `0`  
*Maximum*: `4096`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping FilterCriteria
<a name="aws-properties-lambda-eventsourcemapping-filtercriteria"></a>

 An object that contains the filters for an event source. 

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-filtercriteria-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-filtercriteria-syntax.json"></a>

```
{
  "[Filters](#cfn-lambda-eventsourcemapping-filtercriteria-filters)" : [ Filter, ... ]
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-filtercriteria-syntax.yaml"></a>

```
  [Filters](#cfn-lambda-eventsourcemapping-filtercriteria-filters): 
    - Filter
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-filtercriteria-properties"></a>

`Filters`  <a name="cfn-lambda-eventsourcemapping-filtercriteria-filters"></a>
 A list of filters.   
*Required*: No  
*Type*: Array of [Filter](aws-properties-lambda-eventsourcemapping-filter.md)  
*Minimum*: `1`  
*Maximum*: `20`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping LoggingConfig
<a name="aws-properties-lambda-eventsourcemapping-loggingconfig"></a>

The function's Amazon CloudWatch Logs configuration settings.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-loggingconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-loggingconfig-syntax.json"></a>

```
{
  "[SystemLogLevel](#cfn-lambda-eventsourcemapping-loggingconfig-systemloglevel)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-loggingconfig-syntax.yaml"></a>

```
  [SystemLogLevel](#cfn-lambda-eventsourcemapping-loggingconfig-systemloglevel): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-loggingconfig-properties"></a>

`SystemLogLevel`  <a name="cfn-lambda-eventsourcemapping-loggingconfig-systemloglevel"></a>
Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where `DEBUG` is the highest level and `WARN` is the lowest.  
*Required*: No  
*Type*: String  
*Allowed values*: `DEBUG | INFO | WARN`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping MetricsConfig
<a name="aws-properties-lambda-eventsourcemapping-metricsconfig"></a>

The metrics configuration for your event source. Use this configuration object to define which metrics you want your event source mapping to produce.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-metricsconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-metricsconfig-syntax.json"></a>

```
{
  "[Metrics](#cfn-lambda-eventsourcemapping-metricsconfig-metrics)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-metricsconfig-syntax.yaml"></a>

```
  [Metrics](#cfn-lambda-eventsourcemapping-metricsconfig-metrics): 
    - String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-metricsconfig-properties"></a>

`Metrics`  <a name="cfn-lambda-eventsourcemapping-metricsconfig-metrics"></a>
 The metrics you want your event source mapping to produce, including `EventCount`, `ErrorCount`, `KafkaMetrics`.   
+ `EventCount` to receive metrics related to the number of events processed by your event source mapping.
+ `ErrorCount` (Amazon MSK and self-managed Apache Kafka) to receive metrics related to the number of errors in your event source mapping processing.
+ `KafkaMetrics` (Amazon MSK and self-managed Apache Kafka) to receive metrics related to the Kafka consumers from your event source mapping.
 For more information about these metrics, see [ Event source mapping metrics](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics).   
*Required*: No  
*Type*: Array of String  
*Allowed values*: `EventCount | ErrorCount | KafkaMetrics`  
*Minimum*: `0`  
*Maximum*: `3`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping OnFailure
<a name="aws-properties-lambda-eventsourcemapping-onfailure"></a>

A destination for events that failed processing. For more information, see [Adding a destination](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations).

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-onfailure-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-onfailure-syntax.json"></a>

```
{
  "[Destination](#cfn-lambda-eventsourcemapping-onfailure-destination)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-onfailure-syntax.yaml"></a>

```
  [Destination](#cfn-lambda-eventsourcemapping-onfailure-destination): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-onfailure-properties"></a>

`Destination`  <a name="cfn-lambda-eventsourcemapping-onfailure-destination"></a>
The Amazon Resource Name (ARN) of the destination resource.  
To retain records of failed invocations from [Kinesis](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html), [DynamoDB](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html), [self-managed Apache Kafka](https://docs.aws.amazon.com/lambda/latest/dg/kafka-on-failure.html), or [Amazon MSK](https://docs.aws.amazon.com/lambda/latest/dg/kafka-on-failure.html), you can configure an Amazon SNS topic, Amazon SQS queue, Amazon S3 bucket, or Kafka topic as the destination.  
Amazon SNS destinations have a message size limit of 256 KB. If the combined size of the function request and response payload exceeds the limit, Lambda will drop the payload when sending `OnFailure` event to the destination. For details on this behavior, refer to [Retaining records of asynchronous invocations](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html).
To retain records of failed invocations from [Kinesis](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html), [DynamoDB](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html), [self-managed Kafka](https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-smaa-onfailure-destination) or [Amazon MSK](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-onfailure-destination), you can configure an Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination.  
*Required*: No  
*Type*: String  
*Pattern*: `^$|kafka://([^.]([a-zA-Z0-9\-_.]{0,248}))|arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1})?:(\d{12})?:(.*)`  
*Minimum*: `12`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-lambda-eventsourcemapping-onfailure--examples"></a>



### On-Failure Destination Configuration
<a name="aws-properties-lambda-eventsourcemapping-onfailure--examples--On-Failure_Destination_Configuration"></a>

Configure a function to send a record of failed batches to an SQS queue.

#### YAML
<a name="aws-properties-lambda-eventsourcemapping-onfailure--examples--On-Failure_Destination_Configuration--yaml"></a>

```
          OnFailure:
            Destination: arn:aws:sqs:us-east-2:123456789012:dlq
```

# AWS::Lambda::EventSourceMapping ProvisionedPollerConfig
<a name="aws-properties-lambda-eventsourcemapping-provisionedpollerconfig"></a>

The [ provisioned mode](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode) configuration for the event source. Use Provisioned Mode to customize the minimum and maximum number of event pollers for your event source.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-provisionedpollerconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-provisionedpollerconfig-syntax.json"></a>

```
{
  "[MaximumPollers](#cfn-lambda-eventsourcemapping-provisionedpollerconfig-maximumpollers)" : Integer,
  "[MinimumPollers](#cfn-lambda-eventsourcemapping-provisionedpollerconfig-minimumpollers)" : Integer,
  "[PollerGroupName](#cfn-lambda-eventsourcemapping-provisionedpollerconfig-pollergroupname)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-provisionedpollerconfig-syntax.yaml"></a>

```
  [MaximumPollers](#cfn-lambda-eventsourcemapping-provisionedpollerconfig-maximumpollers): Integer
  [MinimumPollers](#cfn-lambda-eventsourcemapping-provisionedpollerconfig-minimumpollers): Integer
  [PollerGroupName](#cfn-lambda-eventsourcemapping-provisionedpollerconfig-pollergroupname): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-provisionedpollerconfig-properties"></a>

`MaximumPollers`  <a name="cfn-lambda-eventsourcemapping-provisionedpollerconfig-maximumpollers"></a>
The maximum number of event pollers this event source can scale up to. For Amazon SQS events source mappings, default is 200, and minimum value allowed is 2. For Amazon MSK and self-managed Apache Kafka event source mappings, default is 200, and minimum value allowed is 1.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `2000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MinimumPollers`  <a name="cfn-lambda-eventsourcemapping-provisionedpollerconfig-minimumpollers"></a>
The minimum number of event pollers this event source can scale down to. For Amazon SQS events source mappings, default is 2, and minimum 2 required. For Amazon MSK and self-managed Apache Kafka event source mappings, default is 1.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `200`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PollerGroupName`  <a name="cfn-lambda-eventsourcemapping-provisionedpollerconfig-pollergroupname"></a>
(Amazon MSK and self-managed Apache Kafka) The name of the provisioned poller group. Use this option to group multiple ESMs within the event source's VPC to share Event Poller Unit (EPU) capacity. You can use this option to optimize Provisioned mode costs for your ESMs. You can group up to 100 ESMs per poller group and aggregate maximum pollers across all ESMs in a group cannot exceed 2000.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping ScalingConfig
<a name="aws-properties-lambda-eventsourcemapping-scalingconfig"></a>

(Amazon SQS only) The scaling configuration for the event source. To remove the configuration, pass an empty value.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-scalingconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-scalingconfig-syntax.json"></a>

```
{
  "[MaximumConcurrency](#cfn-lambda-eventsourcemapping-scalingconfig-maximumconcurrency)" : Integer
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-scalingconfig-syntax.yaml"></a>

```
  [MaximumConcurrency](#cfn-lambda-eventsourcemapping-scalingconfig-maximumconcurrency): Integer
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-scalingconfig-properties"></a>

`MaximumConcurrency`  <a name="cfn-lambda-eventsourcemapping-scalingconfig-maximumconcurrency"></a>
Limits the number of concurrent instances that the Amazon SQS event source can invoke.  
*Required*: No  
*Type*: Integer  
*Minimum*: `2`  
*Maximum*: `1000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping SchemaRegistryAccessConfig
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryaccessconfig"></a>

Specific access configuration settings that tell Lambda how to authenticate with your schema registry.

If you're working with an AWS Glue schema registry, don't provide authentication details in this object. Instead, ensure that your execution role has the required permissions for Lambda to access your cluster.

If you're working with a Confluent schema registry, choose the authentication method in the `Type` field, and provide the AWS Secrets Manager secret ARN in the `URI` field.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryaccessconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryaccessconfig-syntax.json"></a>

```
{
  "[Type](#cfn-lambda-eventsourcemapping-schemaregistryaccessconfig-type)" : String,
  "[URI](#cfn-lambda-eventsourcemapping-schemaregistryaccessconfig-uri)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryaccessconfig-syntax.yaml"></a>

```
  [Type](#cfn-lambda-eventsourcemapping-schemaregistryaccessconfig-type): String
  [URI](#cfn-lambda-eventsourcemapping-schemaregistryaccessconfig-uri): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryaccessconfig-properties"></a>

`Type`  <a name="cfn-lambda-eventsourcemapping-schemaregistryaccessconfig-type"></a>
 The type of authentication Lambda uses to access your schema registry.   
*Required*: No  
*Type*: String  
*Allowed values*: `BASIC_AUTH | CLIENT_CERTIFICATE_TLS_AUTH | SERVER_ROOT_CA_CERTIFICATE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`URI`  <a name="cfn-lambda-eventsourcemapping-schemaregistryaccessconfig-uri"></a>
 The URI of the secret (Secrets Manager secret ARN) to authenticate with your schema registry.   
*Required*: No  
*Type*: String  
*Pattern*: `arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1})?:(\d{12})?:(.*)`  
*Minimum*: `1`  
*Maximum*: `10000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping SchemaRegistryConfig
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryconfig"></a>

Specific configuration settings for a Kafka schema registry.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryconfig-syntax.json"></a>

```
{
  "[AccessConfigs](#cfn-lambda-eventsourcemapping-schemaregistryconfig-accessconfigs)" : [ SchemaRegistryAccessConfig, ... ],
  "[EventRecordFormat](#cfn-lambda-eventsourcemapping-schemaregistryconfig-eventrecordformat)" : String,
  "[SchemaRegistryURI](#cfn-lambda-eventsourcemapping-schemaregistryconfig-schemaregistryuri)" : String,
  "[SchemaValidationConfigs](#cfn-lambda-eventsourcemapping-schemaregistryconfig-schemavalidationconfigs)" : [ SchemaValidationConfig, ... ]
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryconfig-syntax.yaml"></a>

```
  [AccessConfigs](#cfn-lambda-eventsourcemapping-schemaregistryconfig-accessconfigs): 
    - SchemaRegistryAccessConfig
  [EventRecordFormat](#cfn-lambda-eventsourcemapping-schemaregistryconfig-eventrecordformat): String
  [SchemaRegistryURI](#cfn-lambda-eventsourcemapping-schemaregistryconfig-schemaregistryuri): String
  [SchemaValidationConfigs](#cfn-lambda-eventsourcemapping-schemaregistryconfig-schemavalidationconfigs): 
    - SchemaValidationConfig
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-schemaregistryconfig-properties"></a>

`AccessConfigs`  <a name="cfn-lambda-eventsourcemapping-schemaregistryconfig-accessconfigs"></a>
An array of access configuration objects that tell Lambda how to authenticate with your schema registry.  
*Required*: No  
*Type*: Array of [SchemaRegistryAccessConfig](aws-properties-lambda-eventsourcemapping-schemaregistryaccessconfig.md)  
*Maximum*: `2`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EventRecordFormat`  <a name="cfn-lambda-eventsourcemapping-schemaregistryconfig-eventrecordformat"></a>
The record format that Lambda delivers to your function after schema validation.  
+ Choose `JSON` to have Lambda deliver the record to your function as a standard JSON object.
+ Choose `SOURCE` to have Lambda deliver the record to your function in its original source format. Lambda removes all schema metadata, such as the schema ID, before sending the record to your function.
*Required*: No  
*Type*: String  
*Allowed values*: `JSON | SOURCE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SchemaRegistryURI`  <a name="cfn-lambda-eventsourcemapping-schemaregistryconfig-schemaregistryuri"></a>
The URI for your schema registry. The correct URI format depends on the type of schema registry you're using.  
+ For AWS Glue schema registries, use the ARN of the registry.
+ For Confluent schema registries, use the URL of the registry.
*Required*: No  
*Type*: String  
*Pattern*: `[a-zA-Z0-9-/*:_+=.@-]*`  
*Minimum*: `1`  
*Maximum*: `10000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SchemaValidationConfigs`  <a name="cfn-lambda-eventsourcemapping-schemaregistryconfig-schemavalidationconfigs"></a>
An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry.  
*Required*: No  
*Type*: Array of [SchemaValidationConfig](aws-properties-lambda-eventsourcemapping-schemavalidationconfig.md)  
*Minimum*: `1`  
*Maximum*: `2`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping SchemaValidationConfig
<a name="aws-properties-lambda-eventsourcemapping-schemavalidationconfig"></a>

Specific schema validation configuration settings that tell Lambda the message attributes you want to validate and filter using your schema registry.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-schemavalidationconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-schemavalidationconfig-syntax.json"></a>

```
{
  "[Attribute](#cfn-lambda-eventsourcemapping-schemavalidationconfig-attribute)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-schemavalidationconfig-syntax.yaml"></a>

```
  [Attribute](#cfn-lambda-eventsourcemapping-schemavalidationconfig-attribute): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-schemavalidationconfig-properties"></a>

`Attribute`  <a name="cfn-lambda-eventsourcemapping-schemavalidationconfig-attribute"></a>
 The attributes you want your schema registry to validate and filter for. If you selected `JSON` as the `EventRecordFormat`, Lambda also deserializes the selected message attributes.   
*Required*: No  
*Type*: String  
*Allowed values*: `KEY | VALUE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping SelfManagedEventSource
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedeventsource"></a>

The self-managed Apache Kafka cluster for your event source.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedeventsource-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedeventsource-syntax.json"></a>

```
{
  "[Endpoints](#cfn-lambda-eventsourcemapping-selfmanagedeventsource-endpoints)" : Endpoints
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedeventsource-syntax.yaml"></a>

```
  [Endpoints](#cfn-lambda-eventsourcemapping-selfmanagedeventsource-endpoints): 
    Endpoints
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedeventsource-properties"></a>

`Endpoints`  <a name="cfn-lambda-eventsourcemapping-selfmanagedeventsource-endpoints"></a>
The list of bootstrap servers for your Kafka brokers in the following format: `"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]`.  
*Required*: No  
*Type*: [Endpoints](aws-properties-lambda-eventsourcemapping-endpoints.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Lambda::EventSourceMapping SelfManagedKafkaEventSourceConfig
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig"></a>

Specific configuration settings for a self-managed Apache Kafka event source.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-syntax.json"></a>

```
{
  "[ConsumerGroupId](#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-consumergroupid)" : String,
  "[SchemaRegistryConfig](#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-schemaregistryconfig)" : SchemaRegistryConfig
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-syntax.yaml"></a>

```
  [ConsumerGroupId](#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-consumergroupid): String
  [SchemaRegistryConfig](#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-schemaregistryconfig): 
    SchemaRegistryConfig
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-properties"></a>

`ConsumerGroupId`  <a name="cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-consumergroupid"></a>
 The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see [Customizable consumer group ID](https://docs.aws.amazon.com/lambda/latest/dg/with-kafka-process.html#services-smaa-topic-add).  
*Required*: No  
*Type*: String  
*Pattern*: `[a-zA-Z0-9-\/*:_+=.@-]*`  
*Minimum*: `1`  
*Maximum*: `200`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SchemaRegistryConfig`  <a name="cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-schemaregistryconfig"></a>
Specific configuration settings for a Kafka schema registry.  
*Required*: No  
*Type*: [SchemaRegistryConfig](aws-properties-lambda-eventsourcemapping-schemaregistryconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping SourceAccessConfiguration
<a name="aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration"></a>

An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration-syntax.json"></a>

```
{
  "[Type](#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-type)" : String,
  "[URI](#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-uri)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration-syntax.yaml"></a>

```
  [Type](#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-type): String
  [URI](#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-uri): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration-properties"></a>

`Type`  <a name="cfn-lambda-eventsourcemapping-sourceaccessconfiguration-type"></a>
The type of authentication protocol, VPC components, or virtual host for your event source. For example: `"Type":"SASL_SCRAM_512_AUTH"`.  
+ `BASIC_AUTH` – (Amazon MQ) The AWS Secrets Manager secret that stores your broker credentials.
+ `BASIC_AUTH` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL/PLAIN authentication of your Apache Kafka brokers.
+ `VPC_SUBNET` – (Self-managed Apache Kafka) The subnets associated with your VPC. Lambda connects to these subnets to fetch data from your self-managed Apache Kafka cluster.
+ `VPC_SECURITY_GROUP` – (Self-managed Apache Kafka) The VPC security group used to manage access to your self-managed Apache Kafka brokers.
+ `SASL_SCRAM_256_AUTH` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your self-managed Apache Kafka brokers.
+ `SASL_SCRAM_512_AUTH` – (Amazon MSK, Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your self-managed Apache Kafka brokers.
+ `VIRTUAL_HOST` –- (RabbitMQ) The name of the virtual host in your RabbitMQ broker. Lambda uses this RabbitMQ host as the event source. This property cannot be specified in an UpdateEventSourceMapping API call.
+ `CLIENT_CERTIFICATE_TLS_AUTH` – (Amazon MSK, self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the certificate chain (X.509 PEM), private key (PKCS\$18 PEM), and private key password (optional) used for mutual TLS authentication of your MSK/Apache Kafka brokers.
+ `SERVER_ROOT_CA_CERTIFICATE` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the root CA certificate (X.509 PEM) used for TLS encryption of your Apache Kafka brokers. 
*Required*: No  
*Type*: String  
*Allowed values*: `BASIC_AUTH | VPC_SUBNET | VPC_SECURITY_GROUP | SASL_SCRAM_512_AUTH | SASL_SCRAM_256_AUTH | VIRTUAL_HOST | CLIENT_CERTIFICATE_TLS_AUTH | SERVER_ROOT_CA_CERTIFICATE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`URI`  <a name="cfn-lambda-eventsourcemapping-sourceaccessconfiguration-uri"></a>
The value for your chosen configuration in `Type`. For example: `"URI": "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName"`.  
*Required*: No  
*Type*: String  
*Pattern*: `[a-zA-Z0-9-\/*:_+=.@-]*`  
*Minimum*: `1`  
*Maximum*: `200`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::EventSourceMapping Tag
<a name="aws-properties-lambda-eventsourcemapping-tag"></a>

A [tag](https://docs.aws.amazon.com/lambda/latest/dg/tagging.html) to apply to the event source mapping.

## Syntax
<a name="aws-properties-lambda-eventsourcemapping-tag-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-eventsourcemapping-tag-syntax.json"></a>

```
{
  "[Key](#cfn-lambda-eventsourcemapping-tag-key)" : String,
  "[Value](#cfn-lambda-eventsourcemapping-tag-value)" : String
}
```

### YAML
<a name="aws-properties-lambda-eventsourcemapping-tag-syntax.yaml"></a>

```
  [Key](#cfn-lambda-eventsourcemapping-tag-key): String
  [Value](#cfn-lambda-eventsourcemapping-tag-value): String
```

## Properties
<a name="aws-properties-lambda-eventsourcemapping-tag-properties"></a>

`Key`  <a name="cfn-lambda-eventsourcemapping-tag-key"></a>
The key for this tag.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-lambda-eventsourcemapping-tag-value"></a>
The value for this tag.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::Function
<a name="aws-resource-lambda-function"></a>

The `AWS::Lambda::Function` resource creates a Lambda function. To create a function, you need a [deployment package](https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html) and an [execution role](https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html). The deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use AWS services, such as Amazon CloudWatch Logs for log streaming and AWS X-Ray for request tracing.

You set the package type to `Image` if the deployment package is a [container image](https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html). For these functions, include the URI of the container image in the Amazon ECR registry in the [`ImageUri` property of the `Code` property](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-imageuri). You do not need to specify the handler and runtime properties. 

You set the package type to `Zip` if the deployment package is a [.zip file archive](https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip). For these functions, specify the Amazon S3 location of your .zip file in the `Code` property. Alternatively, for Node.js and Python functions, you can define your function inline in the [`ZipFile` property of the `Code` property](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-zipfile). In both cases, you must also specify the handler and runtime properties.

You can use [code signing](https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html) if your deployment package is a .zip file archive. To enable code signing for this function, specify the ARN of a code-signing configuration. When a user attempts to deploy a code package with `UpdateFunctionCode`, Lambda checks that the code package has a valid signature from a trusted publisher. The code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.

When you update a `AWS::Lambda::Function` resource, CloudFormation calls the [UpdateFunctionConfiguration](https://docs.aws.amazon.com/lambda/latest/api/API_UpdateFunctionConfiguration.html) and [UpdateFunctionCode](https://docs.aws.amazon.com/lambda/latest/api/API_UpdateFunctionCode.html)Lambda APIs under the hood. Because these calls happen sequentially, and invocations can happen between these calls, your function may encounter errors in the time between the calls. For example, if you remove an environment variable, and the code that references that environment variable in the same CloudFormation update, you may see invocation errors related to a missing environment variable. To work around this, you can invoke your function against a version or alias by default, rather than the `$LATEST` version.

Note that you configure [ provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/provisioned-concurrency.html) on a `AWS::Lambda::Version` or a `AWS::Lambda::Alias`.

For a complete introduction to Lambda functions, see [What is Lambda?](https://docs.aws.amazon.com/lambda/latest/dg/lambda-welcome.html) in the *Lambda developer guide.*

## Syntax
<a name="aws-resource-lambda-function-syntax"></a>

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

### JSON
<a name="aws-resource-lambda-function-syntax.json"></a>

```
{
  "Type" : "AWS::Lambda::Function",
  "Properties" : {
      "[Architectures](#cfn-lambda-function-architectures)" : [ String, ... ],
      "[CapacityProviderConfig](#cfn-lambda-function-capacityproviderconfig)" : CapacityProviderConfig,
      "[Code](#cfn-lambda-function-code)" : Code,
      "[CodeSigningConfigArn](#cfn-lambda-function-codesigningconfigarn)" : String,
      "[DeadLetterConfig](#cfn-lambda-function-deadletterconfig)" : DeadLetterConfig,
      "[Description](#cfn-lambda-function-description)" : String,
      "[DurableConfig](#cfn-lambda-function-durableconfig)" : DurableConfig,
      "[Environment](#cfn-lambda-function-environment)" : Environment,
      "[EphemeralStorage](#cfn-lambda-function-ephemeralstorage)" : EphemeralStorage,
      "[FileSystemConfigs](#cfn-lambda-function-filesystemconfigs)" : [ FileSystemConfig, ... ],
      "[FunctionName](#cfn-lambda-function-functionname)" : String,
      "[FunctionScalingConfig](#cfn-lambda-function-functionscalingconfig)" : FunctionScalingConfig,
      "[Handler](#cfn-lambda-function-handler)" : String,
      "[ImageConfig](#cfn-lambda-function-imageconfig)" : ImageConfig,
      "[KmsKeyArn](#cfn-lambda-function-kmskeyarn)" : String,
      "[Layers](#cfn-lambda-function-layers)" : [ String, ... ],
      "[LoggingConfig](#cfn-lambda-function-loggingconfig)" : LoggingConfig,
      "[MemorySize](#cfn-lambda-function-memorysize)" : Integer,
      "[PackageType](#cfn-lambda-function-packagetype)" : String,
      "[PublishToLatestPublished](#cfn-lambda-function-publishtolatestpublished)" : Boolean,
      "[RecursiveLoop](#cfn-lambda-function-recursiveloop)" : String,
      "[ReservedConcurrentExecutions](#cfn-lambda-function-reservedconcurrentexecutions)" : Integer,
      "[Role](#cfn-lambda-function-role)" : String,
      "[Runtime](#cfn-lambda-function-runtime)" : String,
      "[RuntimeManagementConfig](#cfn-lambda-function-runtimemanagementconfig)" : RuntimeManagementConfig,
      "[SnapStart](#cfn-lambda-function-snapstart)" : SnapStart,
      "[Tags](#cfn-lambda-function-tags)" : [ Tag, ... ],
      "[TenancyConfig](#cfn-lambda-function-tenancyconfig)" : TenancyConfig,
      "[Timeout](#cfn-lambda-function-timeout)" : Integer,
      "[TracingConfig](#cfn-lambda-function-tracingconfig)" : TracingConfig,
      "[VpcConfig](#cfn-lambda-function-vpcconfig)" : VpcConfig
    }
}
```

### YAML
<a name="aws-resource-lambda-function-syntax.yaml"></a>

```
Type: AWS::Lambda::Function
Properties:
  [Architectures](#cfn-lambda-function-architectures): 
    - String
  [CapacityProviderConfig](#cfn-lambda-function-capacityproviderconfig): 
    CapacityProviderConfig
  [Code](#cfn-lambda-function-code): 
    Code
  [CodeSigningConfigArn](#cfn-lambda-function-codesigningconfigarn): String
  [DeadLetterConfig](#cfn-lambda-function-deadletterconfig): 
    DeadLetterConfig
  [Description](#cfn-lambda-function-description): String
  [DurableConfig](#cfn-lambda-function-durableconfig): 
    DurableConfig
  [Environment](#cfn-lambda-function-environment): 
    Environment
  [EphemeralStorage](#cfn-lambda-function-ephemeralstorage): 
    EphemeralStorage
  [FileSystemConfigs](#cfn-lambda-function-filesystemconfigs): 
    - FileSystemConfig
  [FunctionName](#cfn-lambda-function-functionname): String
  [FunctionScalingConfig](#cfn-lambda-function-functionscalingconfig): 
    FunctionScalingConfig
  [Handler](#cfn-lambda-function-handler): String
  [ImageConfig](#cfn-lambda-function-imageconfig): 
    ImageConfig
  [KmsKeyArn](#cfn-lambda-function-kmskeyarn): String
  [Layers](#cfn-lambda-function-layers): 
    - String
  [LoggingConfig](#cfn-lambda-function-loggingconfig): 
    LoggingConfig
  [MemorySize](#cfn-lambda-function-memorysize): Integer
  [PackageType](#cfn-lambda-function-packagetype): String
  [PublishToLatestPublished](#cfn-lambda-function-publishtolatestpublished): Boolean
  [RecursiveLoop](#cfn-lambda-function-recursiveloop): String
  [ReservedConcurrentExecutions](#cfn-lambda-function-reservedconcurrentexecutions): Integer
  [Role](#cfn-lambda-function-role): String
  [Runtime](#cfn-lambda-function-runtime): String
  [RuntimeManagementConfig](#cfn-lambda-function-runtimemanagementconfig): 
    RuntimeManagementConfig
  [SnapStart](#cfn-lambda-function-snapstart): 
    SnapStart
  [Tags](#cfn-lambda-function-tags): 
    - Tag
  [TenancyConfig](#cfn-lambda-function-tenancyconfig): 
    TenancyConfig
  [Timeout](#cfn-lambda-function-timeout): Integer
  [TracingConfig](#cfn-lambda-function-tracingconfig): 
    TracingConfig
  [VpcConfig](#cfn-lambda-function-vpcconfig): 
    VpcConfig
```

## Properties
<a name="aws-resource-lambda-function-properties"></a>

`Architectures`  <a name="cfn-lambda-function-architectures"></a>
The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86\$164). The default value is `x86_64`.  
*Required*: No  
*Type*: Array of String  
*Allowed values*: `x86_64 | arm64`  
*Minimum*: `1`  
*Maximum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CapacityProviderConfig`  <a name="cfn-lambda-function-capacityproviderconfig"></a>
Configuration for the capacity provider that manages compute resources for Lambda functions.  
*Required*: No  
*Type*: [CapacityProviderConfig](aws-properties-lambda-function-capacityproviderconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Code`  <a name="cfn-lambda-function-code"></a>
The code for the function. You can define your function code in multiple ways:  
+ For .zip deployment packages, you can specify the Amazon S3 location of the .zip file in the `S3Bucket`, `S3Key`, and `S3ObjectVersion` properties.
+ For .zip deployment packages, you can alternatively define the function code inline in the `ZipFile` property. This method works only for Node.js and Python functions.
+ For container images, specify the URI of your container image in the Amazon ECR registry in the `ImageUri` property.
*Required*: Yes  
*Type*: [Code](aws-properties-lambda-function-code.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CodeSigningConfigArn`  <a name="cfn-lambda-function-codesigningconfigarn"></a>
To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:(aws[a-zA-Z-]*)?:lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:code-signing-config:csc-[a-z0-9]{17}`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeadLetterConfig`  <a name="cfn-lambda-function-deadletterconfig"></a>
A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see [Dead-letter queues](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq).  
*Required*: No  
*Type*: [DeadLetterConfig](aws-properties-lambda-function-deadletterconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Description`  <a name="cfn-lambda-function-description"></a>
A description of the function.  
*Required*: No  
*Type*: String  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DurableConfig`  <a name="cfn-lambda-function-durableconfig"></a>
Configuration settings for [durable functions](https://docs.aws.amazon.com/lambda/latest/dg/durable-functions.html), including execution timeout and retention period for execution history.  
*Required*: No  
*Type*: [DurableConfig](aws-properties-lambda-function-durableconfig.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Environment`  <a name="cfn-lambda-function-environment"></a>
Environment variables that are accessible from function code during execution.  
*Required*: No  
*Type*: [Environment](aws-properties-lambda-function-environment.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EphemeralStorage`  <a name="cfn-lambda-function-ephemeralstorage"></a>
The size of the function's `/tmp` directory in MB. The default value is 512, but it can be any whole number between 512 and 10,240 MB.  
*Required*: No  
*Type*: [EphemeralStorage](aws-properties-lambda-function-ephemeralstorage.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FileSystemConfigs`  <a name="cfn-lambda-function-filesystemconfigs"></a>
Connection settings for an Amazon EFS or Amazon S3 Files file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an [AWS::EFS::MountTarget](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html) or [AWS::S3Files::MountTarget](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3files-mounttarget.html) resource, you must also specify a `DependsOn` attribute to ensure that the mount target is created or updated before the function.  
For more information about using the `DependsOn` attribute, see [DependsOn Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html).   
*Required*: No  
*Type*: Array of [FileSystemConfig](aws-properties-lambda-function-filesystemconfig.md)  
*Maximum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FunctionName`  <a name="cfn-lambda-function-functionname"></a>
The name of the Lambda function, up to 64 characters in length. If you don't specify a name, CloudFormation generates one.  
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.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FunctionScalingConfig`  <a name="cfn-lambda-function-functionscalingconfig"></a>
Configuration that defines the scaling behavior for a Lambda Managed Instances function, including the minimum and maximum number of execution environments that can be provisioned.  
*Required*: No  
*Type*: [FunctionScalingConfig](aws-properties-lambda-function-functionscalingconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Handler`  <a name="cfn-lambda-function-handler"></a>
The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see [Lambda programming model](https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html).  
*Required*: No  
*Type*: String  
*Pattern*: `^[^\s]+$`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ImageConfig`  <a name="cfn-lambda-function-imageconfig"></a>
Configuration values that override the container image Dockerfile settings. For more information, see [Container image settings](https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms).  
*Required*: No  
*Type*: [ImageConfig](aws-properties-lambda-function-imageconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KmsKeyArn`  <a name="cfn-lambda-function-kmskeyarn"></a>
The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt the following resources:  
+ The function's [environment variables](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption).
+ The function's [Lambda SnapStart](https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html) snapshots.
+ When used with `SourceKMSKeyArn`, the unzipped version of the .zip deployment package that's used for function invocations. For more information, see [ Specifying a customer managed key for Lambda](https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption).
+ The optimized version of the container image that's used for function invocations. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). For more information, see [Function lifecycle](https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle).
If you don't provide a customer managed key, Lambda uses an [AWS owned key](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk) or an [AWS managed key](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk).  
*Required*: No  
*Type*: String  
*Pattern*: `^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Layers`  <a name="cfn-lambda-function-layers"></a>
A list of [function layers](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) to add to the function's execution environment. Specify each layer by its ARN, including the version.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LoggingConfig`  <a name="cfn-lambda-function-loggingconfig"></a>
The function's Amazon CloudWatch Logs configuration settings.  
*Required*: No  
*Type*: [LoggingConfig](aws-properties-lambda-function-loggingconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MemorySize`  <a name="cfn-lambda-function-memorysize"></a>
The amount of [memory available to the function](https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console) at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB. Note that new AWS accounts have reduced concurrency and memory quotas. AWS raises these quotas automatically based on your usage. You can also request a quota increase.  
*Required*: No  
*Type*: Integer  
*Minimum*: `128`  
*Maximum*: `32768`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PackageType`  <a name="cfn-lambda-function-packagetype"></a>
The type of deployment package. Set to `Image` for container image and set `Zip` for .zip file archive.  
*Required*: No  
*Type*: String  
*Allowed values*: `Image | Zip`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PublishToLatestPublished`  <a name="cfn-lambda-function-publishtolatestpublished"></a>
Property description not available.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RecursiveLoop`  <a name="cfn-lambda-function-recursiveloop"></a>
The status of your function's recursive loop detection configuration.  
When this value is set to `Allow`and Lambda detects your function being invoked as part of a recursive loop, it doesn't take any action.  
When this value is set to `Terminate` and Lambda detects your function being invoked as part of a recursive loop, it stops your function being invoked and notifies you.   
*Required*: No  
*Type*: String  
*Allowed values*: `Allow | Terminate`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ReservedConcurrentExecutions`  <a name="cfn-lambda-function-reservedconcurrentexecutions"></a>
The number of simultaneous executions to reserve for the function.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Role`  <a name="cfn-lambda-function-role"></a>
The Amazon Resource Name (ARN) of the function's execution role.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Runtime`  <a name="cfn-lambda-function-runtime"></a>
The identifier of the function's [ runtime](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html). Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.  
The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see [Runtime use after deprecation](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels).  
For a list of all currently supported runtimes, see [Supported runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported).  
*Required*: No  
*Type*: String  
*Allowed values*: `nodejs | nodejs4.3 | nodejs6.10 | nodejs8.10 | nodejs10.x | nodejs12.x | nodejs14.x | nodejs16.x | java8 | java8.al2 | java11 | python2.7 | python3.6 | python3.7 | python3.8 | python3.9 | dotnetcore1.0 | dotnetcore2.0 | dotnetcore2.1 | dotnetcore3.1 | dotnet6 | dotnet8 | nodejs4.3-edge | go1.x | ruby2.5 | ruby2.7 | provided | provided.al2 | nodejs18.x | python3.10 | java17 | ruby3.2 | ruby3.3 | ruby3.4 | python3.11 | nodejs20.x | provided.al2023 | python3.12 | java21 | python3.13 | nodejs22.x | nodejs24.x | python3.14 | java25 | dotnet10`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RuntimeManagementConfig`  <a name="cfn-lambda-function-runtimemanagementconfig"></a>
Sets the runtime management configuration for a function's version. For more information, see [Runtime updates](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html).  
*Required*: No  
*Type*: [RuntimeManagementConfig](aws-properties-lambda-function-runtimemanagementconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SnapStart`  <a name="cfn-lambda-function-snapstart"></a>
The function's [AWS Lambda SnapStart](https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html) setting.  
*Required*: No  
*Type*: [SnapStart](aws-properties-lambda-function-snapstart.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-lambda-function-tags"></a>
A list of [tags](https://docs.aws.amazon.com/lambda/latest/dg/tagging.html) to apply to the function.  
You must have the `lambda:TagResource`, `lambda:UntagResource`, and `lambda:ListTags` permissions for your [IAM principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html) 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](aws-properties-lambda-function-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TenancyConfig`  <a name="cfn-lambda-function-tenancyconfig"></a>
The function's tenant isolation configuration settings. Determines whether the Lambda function runs on a shared or dedicated infrastructure per unique tenant.  
*Required*: No  
*Type*: [TenancyConfig](aws-properties-lambda-function-tenancyconfig.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Timeout`  <a name="cfn-lambda-function-timeout"></a>
The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see [Lambda execution environment](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html).  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TracingConfig`  <a name="cfn-lambda-function-tracingconfig"></a>
Set `Mode` to `Active` to sample and trace a subset of incoming requests with [X-Ray](https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html).  
*Required*: No  
*Type*: [TracingConfig](aws-properties-lambda-function-tracingconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VpcConfig`  <a name="cfn-lambda-function-vpcconfig"></a>
For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see [Configuring a Lambda function to access resources in a VPC](https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html).  
*Required*: No  
*Type*: [VpcConfig](aws-properties-lambda-function-vpcconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-lambda-function-return-values"></a>

### Ref
<a name="aws-resource-lambda-function-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the resource name.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-lambda-function-return-values-fn--getatt"></a>

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 [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-lambda-function-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the function.

`SnapStartResponse.ApplyOn`  <a name="SnapStartResponse.ApplyOn-fn::getatt"></a>
Property description not available.

`SnapStartResponse.OptimizationStatus`  <a name="SnapStartResponse.OptimizationStatus-fn::getatt"></a>
Property description not available.

## Examples
<a name="aws-resource-lambda-function--examples"></a>



**Topics**
+ [Function](#aws-resource-lambda-function--examples--Function)
+ [Inline Function](#aws-resource-lambda-function--examples--Inline_Function)
+ [VPC Function](#aws-resource-lambda-function--examples--VPC_Function)

### Function
<a name="aws-resource-lambda-function--examples--Function"></a>

Create a Node.js function.

#### JSON
<a name="aws-resource-lambda-function--examples--Function--json"></a>

```
"AMIIDLookup": {
    "Type": "AWS::Lambda::Function",
    "Properties": {
        "Handler": "index.handler",
        "Role": {
            "Fn::GetAtt": [
                "LambdaExecutionRole",
                "Arn"
            ]
        },
        "Code": {
            "S3Bucket": "amzn-s3-demo-bucket",
            "S3Key": "amilookup.zip"
        },
        "Runtime": "nodejs20.x",
        "Timeout": 25,
        "TracingConfig": {
            "Mode": "Active"
        }
    }
}
```

### Inline Function
<a name="aws-resource-lambda-function--examples--Inline_Function"></a>

Inline Node.js function that lists Amazon S3 buckets in ` us-east-1 `. Before using this example, make sure that your execution role has Amazon S3 read permissions.

#### YAML
<a name="aws-resource-lambda-function--examples--Inline_Function--yaml"></a>

```
AWSTemplateFormatVersion: '2010-09-09'
Description: Lambda function ListBucketsCommand.
Resources:
  primer:
    Type: AWS::Lambda::Function
    Properties:
      Runtime: nodejs20.x
      Role: arn:aws:iam::111122223333:role/lambda-role
      Handler: index.handler
      Code:
        ZipFile: |
          const { S3Client, ListBucketsCommand } = require("@aws-sdk/client-s3");
          const s3 = new S3Client({ region: "us-east-1" }); // replace "us-east-1" with your AWS Region

          exports.handler = async function(event) {
            const command = new ListBucketsCommand({});
            const response = await s3.send(command);
            return response.Buckets;
          };
      Description: List Amazon S3 buckets in us-east-1.
      TracingConfig:
        Mode: Active
```

### VPC Function
<a name="aws-resource-lambda-function--examples--VPC_Function"></a>

Function connected to a VPC.

#### YAML
<a name="aws-resource-lambda-function--examples--VPC_Function--yaml"></a>

```
AWSTemplateFormatVersion: '2010-09-09'
Description: VPC function.
Resources:
  Function:
    Type: AWS::Lambda::Function
    Properties:
      Handler: index.handler
      Role: arn:aws:iam::111122223333:role/lambda-role
      Code:
        S3Bucket: amzn-s3-demo-bucket
        S3Key: function.zip
      Runtime: nodejs20.x
      Timeout: 5
      TracingConfig:
        Mode: Active
      VpcConfig:
        SecurityGroupIds:
          - sg-085912345678492fb
        SubnetIds:
          - subnet-071f712345678e7c8
          - subnet-07fd123456788a036
```

# AWS::Lambda::Function CapacityProviderConfig
<a name="aws-properties-lambda-function-capacityproviderconfig"></a>

Configuration for the capacity provider that manages compute resources for Lambda functions.

## Syntax
<a name="aws-properties-lambda-function-capacityproviderconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-capacityproviderconfig-syntax.json"></a>

```
{
  "[LambdaManagedInstancesCapacityProviderConfig](#cfn-lambda-function-capacityproviderconfig-lambdamanagedinstancescapacityproviderconfig)" : LambdaManagedInstancesCapacityProviderConfig
}
```

### YAML
<a name="aws-properties-lambda-function-capacityproviderconfig-syntax.yaml"></a>

```
  [LambdaManagedInstancesCapacityProviderConfig](#cfn-lambda-function-capacityproviderconfig-lambdamanagedinstancescapacityproviderconfig): 
    LambdaManagedInstancesCapacityProviderConfig
```

## Properties
<a name="aws-properties-lambda-function-capacityproviderconfig-properties"></a>

`LambdaManagedInstancesCapacityProviderConfig`  <a name="cfn-lambda-function-capacityproviderconfig-lambdamanagedinstancescapacityproviderconfig"></a>
Configuration for Lambda-managed instances used by the capacity provider.  
*Required*: Yes  
*Type*: [LambdaManagedInstancesCapacityProviderConfig](aws-properties-lambda-function-lambdamanagedinstancescapacityproviderconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::Function Code
<a name="aws-properties-lambda-function-code"></a>

The [deployment package](https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html) for a Lambda function. To deploy a function defined as a container image, you specify the location of a container image in the Amazon ECR registry. For a .zip file deployment package, you can specify the location of an object in Amazon S3. For Node.js and Python functions, you can specify the function code inline in the template.

**Note**  
When you specify source code inline for a Node.js function, the `index` file that CloudFormation creates uses the extension `.js`. This means that Node.js treats the file as a CommonJS module.

Changes to a deployment package in Amazon S3 or a container image in ECR are not detected automatically during stack updates. To update the function code, change the object key or version in the template.

## Syntax
<a name="aws-properties-lambda-function-code-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-code-syntax.json"></a>

```
{
  "[ImageUri](#cfn-lambda-function-code-imageuri)" : String,
  "[S3Bucket](#cfn-lambda-function-code-s3bucket)" : String,
  "[S3Key](#cfn-lambda-function-code-s3key)" : String,
  "[S3ObjectStorageMode](#cfn-lambda-function-code-s3objectstoragemode)" : String,
  "[S3ObjectVersion](#cfn-lambda-function-code-s3objectversion)" : String,
  "[SourceKMSKeyArn](#cfn-lambda-function-code-sourcekmskeyarn)" : String,
  "[ZipFile](#cfn-lambda-function-code-zipfile)" : String
}
```

### YAML
<a name="aws-properties-lambda-function-code-syntax.yaml"></a>

```
  [ImageUri](#cfn-lambda-function-code-imageuri): String
  [S3Bucket](#cfn-lambda-function-code-s3bucket): String
  [S3Key](#cfn-lambda-function-code-s3key): String
  [S3ObjectStorageMode](#cfn-lambda-function-code-s3objectstoragemode): String
  [S3ObjectVersion](#cfn-lambda-function-code-s3objectversion): String
  [SourceKMSKeyArn](#cfn-lambda-function-code-sourcekmskeyarn): String
  [ZipFile](#cfn-lambda-function-code-zipfile): String
```

## Properties
<a name="aws-properties-lambda-function-code-properties"></a>

`ImageUri`  <a name="cfn-lambda-function-code-imageuri"></a>
URI of a [container image](https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html) in the Amazon ECR registry.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`S3Bucket`  <a name="cfn-lambda-function-code-s3bucket"></a>
An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account.  
*Required*: Conditional  
*Type*: String  
*Pattern*: `^[0-9A-Za-z\.\-_]*(?<!\.)$`  
*Minimum*: `3`  
*Maximum*: `63`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`S3Key`  <a name="cfn-lambda-function-code-s3key"></a>
The Amazon S3 key of the deployment package.  
*Required*: Conditional  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`S3ObjectStorageMode`  <a name="cfn-lambda-function-code-s3objectstoragemode"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Allowed values*: `COPY | REFERENCE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`S3ObjectVersion`  <a name="cfn-lambda-function-code-s3objectversion"></a>
For versioned objects, the version of the deployment package object to use.  
*Required*: Conditional  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SourceKMSKeyArn`  <a name="cfn-lambda-function-code-sourcekmskeyarn"></a>
The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt your function's .zip deployment package. If you don't provide a customer managed key, Lambda uses an [AWS owned key](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk).  
*Required*: No  
*Type*: String  
*Pattern*: `^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ZipFile`  <a name="cfn-lambda-function-code-zipfile"></a>
(Node.js and Python) The source code of your Lambda function. If you include your function source inline with this parameter, CloudFormation places it in a file named `index` and zips it to create a [deployment package](https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html). This zip file cannot exceed 4MB. For the `Handler` property, the first part of the handler identifier must be `index`. For example, `index.handler`.  
When you specify source code inline for a Node.js function, the `index` file that CloudFormation creates uses the extension `.js`. This means that Node.js treats the file as a CommonJS module.  
When using Node.js 24 or later, Node.js can automatically detect if a `.js` file should be treated as CommonJS or as an ES module. To enable auto-detection, add the `--experimental-detect-module` flag to the `NODE_OPTIONS` environment variable. For more information, see [Experimental Node.js features](https://docs.aws.amazon.com//lambda/latest/dg/lambda-nodejs.html#nodejs-experimental-features).
 For JSON, you must escape quotes and special characters such as newline (`\n`) with a backslash.  
If you specify a function that interacts with an AWS CloudFormation custom resource, you don't have to write your own functions to send responses to the custom resource that invoked the function. AWS CloudFormation provides a response module ([cfn-response](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-lambda-function-code-cfnresponsemodule.html)) that simplifies sending responses. See [Using AWS Lambda with AWS CloudFormation](https://docs.aws.amazon.com/lambda/latest/dg/services-cloudformation.html) for details.   
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-lambda-function-code--examples"></a>

### Inline Function
<a name="aws-properties-lambda-function-code--examples--Inline_Function"></a>

Inline Node.js function that lists Amazon S3 buckets in ` us-east-1 `. This example uses the [AWS SDK for JavaScript v3](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html), which is available in the `nodejs18.x` runtime. Before using this example, make sure that your function's execution role has Amazon S3 read permissions.

#### YAML
<a name="aws-properties-lambda-function-code--examples--Inline_Function--yaml"></a>

```
      Code:
        ZipFile: |
          const { S3Client, ListBucketsCommand } = require("@aws-sdk/client-s3");
          const s3 = new S3Client({ region: "us-east-1" }); // replace "us-east-1" with your AWS Region

          exports.handler = async function(event) {
            const command = new ListBucketsCommand({});
            const response = await s3.send(command);
            return response.Buckets;
          };
```

# AWS::Lambda::Function DeadLetterConfig
<a name="aws-properties-lambda-function-deadletterconfig"></a>

The [dead-letter queue](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-dlq) for failed asynchronous invocations.

## Syntax
<a name="aws-properties-lambda-function-deadletterconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-deadletterconfig-syntax.json"></a>

```
{
  "[TargetArn](#cfn-lambda-function-deadletterconfig-targetarn)" : String
}
```

### YAML
<a name="aws-properties-lambda-function-deadletterconfig-syntax.yaml"></a>

```
  [TargetArn](#cfn-lambda-function-deadletterconfig-targetarn): String
```

## Properties
<a name="aws-properties-lambda-function-deadletterconfig-properties"></a>

`TargetArn`  <a name="cfn-lambda-function-deadletterconfig-targetarn"></a>
The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.  
*Required*: No  
*Type*: String  
*Pattern*: `^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-lambda-function-deadletterconfig--examples"></a>

### Dead-letter Queue
<a name="aws-properties-lambda-function-deadletterconfig--examples--Dead-letter_Queue"></a>

Add a dead-letter queue to a function.

#### YAML
<a name="aws-properties-lambda-function-deadletterconfig--examples--Dead-letter_Queue--yaml"></a>

```
      DeadLetterConfig:
        TargetArn: arn:aws:sqs:us-east-2:123456789012:dlq
```

# AWS::Lambda::Function DurableConfig
<a name="aws-properties-lambda-function-durableconfig"></a>

Configuration settings for [durable functions](https://docs.aws.amazon.com/lambda/latest/dg/durable-functions.html), including execution timeout and retention period for execution history.

## Syntax
<a name="aws-properties-lambda-function-durableconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-durableconfig-syntax.json"></a>

```
{
  "[ExecutionTimeout](#cfn-lambda-function-durableconfig-executiontimeout)" : Integer,
  "[RetentionPeriodInDays](#cfn-lambda-function-durableconfig-retentionperiodindays)" : Integer
}
```

### YAML
<a name="aws-properties-lambda-function-durableconfig-syntax.yaml"></a>

```
  [ExecutionTimeout](#cfn-lambda-function-durableconfig-executiontimeout): Integer
  [RetentionPeriodInDays](#cfn-lambda-function-durableconfig-retentionperiodindays): Integer
```

## Properties
<a name="aws-properties-lambda-function-durableconfig-properties"></a>

`ExecutionTimeout`  <a name="cfn-lambda-function-durableconfig-executiontimeout"></a>
The maximum time (in seconds) that a durable execution can run before timing out. This timeout applies to the entire durable execution, not individual function invocations.  
*Required*: Yes  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `31622400`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RetentionPeriodInDays`  <a name="cfn-lambda-function-durableconfig-retentionperiodindays"></a>
The number of days to retain execution history after a durable execution completes. After this period, execution history is no longer available through the GetDurableExecutionHistory API.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `90`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::Function Environment
<a name="aws-properties-lambda-function-environment"></a>

A function's environment variable settings. You can use environment variables to adjust your function's behavior without updating code. An environment variable is a pair of strings that are stored in a function's version-specific configuration.

## Syntax
<a name="aws-properties-lambda-function-environment-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-environment-syntax.json"></a>

```
{
  "[Variables](#cfn-lambda-function-environment-variables)" : {Key: Value, ...}
}
```

### YAML
<a name="aws-properties-lambda-function-environment-syntax.yaml"></a>

```
  [Variables](#cfn-lambda-function-environment-variables): 
    Key: Value
```

## Properties
<a name="aws-properties-lambda-function-environment-properties"></a>

`Variables`  <a name="cfn-lambda-function-environment-variables"></a>
Environment variable key-value pairs. For more information, see [Using Lambda environment variables](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html).  
If the value of the environment variable is a time or a duration, enclose the value in quotes.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z][a-zA-Z0-9_]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-lambda-function-environment--examples"></a>

### Environment Variables
<a name="aws-properties-lambda-function-environment--examples--Environment_Variables"></a>

Add environment variables to a function. Each variable is a key-value pair. This example specifies values for a `databaseName` and a `databaseUser`.

#### YAML
<a name="aws-properties-lambda-function-environment--examples--Environment_Variables--yaml"></a>

```
      Environment:
        Variables:
          databaseName: lambdadb
          databaseUser: admin
```

# AWS::Lambda::Function EphemeralStorage
<a name="aws-properties-lambda-function-ephemeralstorage"></a>

The size of the function's `/tmp` directory in MB. The default value is 512, but it can be any whole number between 512 and 10,240 MB.

## Syntax
<a name="aws-properties-lambda-function-ephemeralstorage-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-ephemeralstorage-syntax.json"></a>

```
{
  "[Size](#cfn-lambda-function-ephemeralstorage-size)" : Integer
}
```

### YAML
<a name="aws-properties-lambda-function-ephemeralstorage-syntax.yaml"></a>

```
  [Size](#cfn-lambda-function-ephemeralstorage-size): Integer
```

## Properties
<a name="aws-properties-lambda-function-ephemeralstorage-properties"></a>

`Size`  <a name="cfn-lambda-function-ephemeralstorage-size"></a>
The size of the function's `/tmp` directory.  
*Required*: Yes  
*Type*: Integer  
*Minimum*: `512`  
*Maximum*: `10240`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::Function FileSystemConfig
<a name="aws-properties-lambda-function-filesystemconfig"></a>

Details about the connection between a Lambda function and an [Amazon EFS file system](https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html) or an [Amazon S3 Files file system](https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html).

## Syntax
<a name="aws-properties-lambda-function-filesystemconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-filesystemconfig-syntax.json"></a>

```
{
  "[Arn](#cfn-lambda-function-filesystemconfig-arn)" : String,
  "[LocalMountPath](#cfn-lambda-function-filesystemconfig-localmountpath)" : String
}
```

### YAML
<a name="aws-properties-lambda-function-filesystemconfig-syntax.yaml"></a>

```
  [Arn](#cfn-lambda-function-filesystemconfig-arn): String
  [LocalMountPath](#cfn-lambda-function-filesystemconfig-localmountpath): String
```

## Properties
<a name="aws-properties-lambda-function-filesystemconfig-properties"></a>

`Arn`  <a name="cfn-lambda-function-filesystemconfig-arn"></a>
The Amazon Resource Name (ARN) of the Amazon EFS or Amazon S3 Files access point that provides access to the file system.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^arn:aws[a-zA-Z-]*:elasticfilesystem:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:access-point/fsap-[a-f0-9]{17}$|^arn:aws[-a-z]*:s3files:[0-9a-z-:]+:file-system/fs-[0-9a-f]{17,40}/access-point/fsap-[0-9a-f]{17,40}$`  
*Maximum*: `200`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LocalMountPath`  <a name="cfn-lambda-function-filesystemconfig-localmountpath"></a>
The path where the function can access the file system, starting with `/mnt/`.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^/mnt/[a-zA-Z0-9-_.]+$`  
*Maximum*: `160`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::Function FunctionScalingConfig
<a name="aws-properties-lambda-function-functionscalingconfig"></a>

Configuration that defines the scaling behavior for a Lambda Managed Instances function, including the minimum and maximum number of execution environments that can be provisioned.

## Syntax
<a name="aws-properties-lambda-function-functionscalingconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-functionscalingconfig-syntax.json"></a>

```
{
  "[MaxExecutionEnvironments](#cfn-lambda-function-functionscalingconfig-maxexecutionenvironments)" : Integer,
  "[MinExecutionEnvironments](#cfn-lambda-function-functionscalingconfig-minexecutionenvironments)" : Integer
}
```

### YAML
<a name="aws-properties-lambda-function-functionscalingconfig-syntax.yaml"></a>

```
  [MaxExecutionEnvironments](#cfn-lambda-function-functionscalingconfig-maxexecutionenvironments): Integer
  [MinExecutionEnvironments](#cfn-lambda-function-functionscalingconfig-minexecutionenvironments): Integer
```

## Properties
<a name="aws-properties-lambda-function-functionscalingconfig-properties"></a>

`MaxExecutionEnvironments`  <a name="cfn-lambda-function-functionscalingconfig-maxexecutionenvironments"></a>
The maximum number of execution environments that can be provisioned for the function.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `15000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MinExecutionEnvironments`  <a name="cfn-lambda-function-functionscalingconfig-minexecutionenvironments"></a>
The minimum number of execution environments to maintain for the function.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `15000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::Function ImageConfig
<a name="aws-properties-lambda-function-imageconfig"></a>

Configuration values that override the container image Dockerfile settings. For more information, see [Container image settings](https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms).

## Syntax
<a name="aws-properties-lambda-function-imageconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-imageconfig-syntax.json"></a>

```
{
  "[Command](#cfn-lambda-function-imageconfig-command)" : [ String, ... ],
  "[EntryPoint](#cfn-lambda-function-imageconfig-entrypoint)" : [ String, ... ],
  "[WorkingDirectory](#cfn-lambda-function-imageconfig-workingdirectory)" : String
}
```

### YAML
<a name="aws-properties-lambda-function-imageconfig-syntax.yaml"></a>

```
  [Command](#cfn-lambda-function-imageconfig-command): 
    - String
  [EntryPoint](#cfn-lambda-function-imageconfig-entrypoint): 
    - String
  [WorkingDirectory](#cfn-lambda-function-imageconfig-workingdirectory): String
```

## Properties
<a name="aws-properties-lambda-function-imageconfig-properties"></a>

`Command`  <a name="cfn-lambda-function-imageconfig-command"></a>
Specifies parameters that you want to pass in with ENTRYPOINT. You can specify a maximum of 1,500 parameters in the list.  
*Required*: No  
*Type*: Array of String  
*Maximum*: `1500`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EntryPoint`  <a name="cfn-lambda-function-imageconfig-entrypoint"></a>
Specifies the entry point to their application, which is typically the location of the runtime executable. You can specify a maximum of 1,500 string entries in the list.  
*Required*: No  
*Type*: Array of String  
*Maximum*: `1500`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`WorkingDirectory`  <a name="cfn-lambda-function-imageconfig-workingdirectory"></a>
Specifies the working directory. The length of the directory string cannot exceed 1,000 characters.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `1000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::Function LambdaManagedInstancesCapacityProviderConfig
<a name="aws-properties-lambda-function-lambdamanagedinstancescapacityproviderconfig"></a>

Configuration for Lambda-managed instances used by the capacity provider.

## Syntax
<a name="aws-properties-lambda-function-lambdamanagedinstancescapacityproviderconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-lambdamanagedinstancescapacityproviderconfig-syntax.json"></a>

```
{
  "[CapacityProviderArn](#cfn-lambda-function-lambdamanagedinstancescapacityproviderconfig-capacityproviderarn)" : String,
  "[ExecutionEnvironmentMemoryGiBPerVCpu](#cfn-lambda-function-lambdamanagedinstancescapacityproviderconfig-executionenvironmentmemorygibpervcpu)" : Number,
  "[PerExecutionEnvironmentMaxConcurrency](#cfn-lambda-function-lambdamanagedinstancescapacityproviderconfig-perexecutionenvironmentmaxconcurrency)" : Integer
}
```

### YAML
<a name="aws-properties-lambda-function-lambdamanagedinstancescapacityproviderconfig-syntax.yaml"></a>

```
  [CapacityProviderArn](#cfn-lambda-function-lambdamanagedinstancescapacityproviderconfig-capacityproviderarn): String
  [ExecutionEnvironmentMemoryGiBPerVCpu](#cfn-lambda-function-lambdamanagedinstancescapacityproviderconfig-executionenvironmentmemorygibpervcpu): Number
  [PerExecutionEnvironmentMaxConcurrency](#cfn-lambda-function-lambdamanagedinstancescapacityproviderconfig-perexecutionenvironmentmaxconcurrency): Integer
```

## Properties
<a name="aws-properties-lambda-function-lambdamanagedinstancescapacityproviderconfig-properties"></a>

`CapacityProviderArn`  <a name="cfn-lambda-function-lambdamanagedinstancescapacityproviderconfig-capacityproviderarn"></a>
The Amazon Resource Name (ARN) of the capacity provider.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^arn:aws[a-zA-Z-]*:lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:capacity-provider:[a-zA-Z0-9-_]+$`  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ExecutionEnvironmentMemoryGiBPerVCpu`  <a name="cfn-lambda-function-lambdamanagedinstancescapacityproviderconfig-executionenvironmentmemorygibpervcpu"></a>
The amount of memory in GiB allocated per vCPU for execution environments.  
*Required*: No  
*Type*: Number  
*Minimum*: `2`  
*Maximum*: `8`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PerExecutionEnvironmentMaxConcurrency`  <a name="cfn-lambda-function-lambdamanagedinstancescapacityproviderconfig-perexecutionenvironmentmaxconcurrency"></a>
The maximum number of concurrent executions that can run on each execution environment.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `1600`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::Function LoggingConfig
<a name="aws-properties-lambda-function-loggingconfig"></a>

The function's Amazon CloudWatch Logs configuration settings.

## Syntax
<a name="aws-properties-lambda-function-loggingconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-loggingconfig-syntax.json"></a>

```
{
  "[ApplicationLogLevel](#cfn-lambda-function-loggingconfig-applicationloglevel)" : String,
  "[LogFormat](#cfn-lambda-function-loggingconfig-logformat)" : String,
  "[LogGroup](#cfn-lambda-function-loggingconfig-loggroup)" : String,
  "[SystemLogLevel](#cfn-lambda-function-loggingconfig-systemloglevel)" : String
}
```

### YAML
<a name="aws-properties-lambda-function-loggingconfig-syntax.yaml"></a>

```
  [ApplicationLogLevel](#cfn-lambda-function-loggingconfig-applicationloglevel): String
  [LogFormat](#cfn-lambda-function-loggingconfig-logformat): String
  [LogGroup](#cfn-lambda-function-loggingconfig-loggroup): String
  [SystemLogLevel](#cfn-lambda-function-loggingconfig-systemloglevel): String
```

## Properties
<a name="aws-properties-lambda-function-loggingconfig-properties"></a>

`ApplicationLogLevel`  <a name="cfn-lambda-function-loggingconfig-applicationloglevel"></a>
Set this property to filter the application logs for your function that Lambda sends to CloudWatch. Lambda only sends application logs at the selected level of detail and lower, where `TRACE` is the highest level and `FATAL` is the lowest.  
*Required*: No  
*Type*: String  
*Allowed values*: `TRACE | DEBUG | INFO | WARN | ERROR | FATAL`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LogFormat`  <a name="cfn-lambda-function-loggingconfig-logformat"></a>
The format in which Lambda sends your function's application and system logs to CloudWatch. Select between plain text and structured JSON.  
*Required*: No  
*Type*: String  
*Allowed values*: `Text | JSON`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LogGroup`  <a name="cfn-lambda-function-loggingconfig-loggroup"></a>
The name of the Amazon CloudWatch log group the function sends logs to. By default, Lambda functions send logs to a default log group named `/aws/lambda/<function name>`. To use a different log group, enter an existing log group or enter a new log group name.  
*Required*: No  
*Type*: String  
*Pattern*: `[\.\-_/#A-Za-z0-9]+`  
*Minimum*: `1`  
*Maximum*: `512`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SystemLogLevel`  <a name="cfn-lambda-function-loggingconfig-systemloglevel"></a>
Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where `DEBUG` is the highest level and `WARN` is the lowest.  
*Required*: No  
*Type*: String  
*Allowed values*: `DEBUG | INFO | WARN`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::Function RuntimeManagementConfig
<a name="aws-properties-lambda-function-runtimemanagementconfig"></a>

Sets the runtime management configuration for a function's version. For more information, see [Runtime updates](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html).

## Syntax
<a name="aws-properties-lambda-function-runtimemanagementconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-runtimemanagementconfig-syntax.json"></a>

```
{
  "[RuntimeVersionArn](#cfn-lambda-function-runtimemanagementconfig-runtimeversionarn)" : String,
  "[UpdateRuntimeOn](#cfn-lambda-function-runtimemanagementconfig-updateruntimeon)" : String
}
```

### YAML
<a name="aws-properties-lambda-function-runtimemanagementconfig-syntax.yaml"></a>

```
  [RuntimeVersionArn](#cfn-lambda-function-runtimemanagementconfig-runtimeversionarn): String
  [UpdateRuntimeOn](#cfn-lambda-function-runtimemanagementconfig-updateruntimeon): String
```

## Properties
<a name="aws-properties-lambda-function-runtimemanagementconfig-properties"></a>

`RuntimeVersionArn`  <a name="cfn-lambda-function-runtimemanagementconfig-runtimeversionarn"></a>
The ARN of the runtime version you want the function to use.  
This is only required if you're using the **Manual** runtime update mode.
*Required*: No  
*Type*: String  
*Pattern*: `arn:(aws[a-zA-Z-]*):lambda:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\d{1}::runtime:.+`  
*Minimum*: `26`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UpdateRuntimeOn`  <a name="cfn-lambda-function-runtimemanagementconfig-updateruntimeon"></a>
Specify the runtime update mode.  
+ **Auto (default)** - Automatically update to the most recent and secure runtime version using a [Two-phase runtime version rollout](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase). This is the best choice for most customers to ensure they always benefit from runtime updates.
+ **FunctionUpdate** - Lambda updates the runtime of you function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.
+ **Manual** - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see [Roll back a runtime version](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback).
*Valid Values*: `Auto` \$1 `FunctionUpdate` \$1 `Manual`  
*Required*: Yes  
*Type*: String  
*Allowed values*: `Auto | FunctionUpdate | Manual`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::Function SnapStart
<a name="aws-properties-lambda-function-snapstart"></a>

The function's [AWS Lambda SnapStart](https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html) setting.

## Syntax
<a name="aws-properties-lambda-function-snapstart-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-snapstart-syntax.json"></a>

```
{
  "[ApplyOn](#cfn-lambda-function-snapstart-applyon)" : String
}
```

### YAML
<a name="aws-properties-lambda-function-snapstart-syntax.yaml"></a>

```
  [ApplyOn](#cfn-lambda-function-snapstart-applyon): String
```

## Properties
<a name="aws-properties-lambda-function-snapstart-properties"></a>

`ApplyOn`  <a name="cfn-lambda-function-snapstart-applyon"></a>
Set `ApplyOn` to `PublishedVersions` to create a snapshot of the initialized execution environment when you publish a function version.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `PublishedVersions | None`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::Function SnapStartResponse
<a name="aws-properties-lambda-function-snapstartresponse"></a>

The function's [SnapStart](https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html) setting.

## Syntax
<a name="aws-properties-lambda-function-snapstartresponse-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-snapstartresponse-syntax.json"></a>

```
{
  "[ApplyOn](#cfn-lambda-function-snapstartresponse-applyon)" : String,
  "[OptimizationStatus](#cfn-lambda-function-snapstartresponse-optimizationstatus)" : String
}
```

### YAML
<a name="aws-properties-lambda-function-snapstartresponse-syntax.yaml"></a>

```
  [ApplyOn](#cfn-lambda-function-snapstartresponse-applyon): String
  [OptimizationStatus](#cfn-lambda-function-snapstartresponse-optimizationstatus): String
```

## Properties
<a name="aws-properties-lambda-function-snapstartresponse-properties"></a>

`ApplyOn`  <a name="cfn-lambda-function-snapstartresponse-applyon"></a>
When set to `PublishedVersions`, Lambda creates a snapshot of the execution environment when you publish a function version.  
*Required*: No  
*Type*: String  
*Allowed values*: `PublishedVersions | None`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OptimizationStatus`  <a name="cfn-lambda-function-snapstartresponse-optimizationstatus"></a>
When you provide a [qualified Amazon Resource Name (ARN)](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html#versioning-versions-using), this response element indicates whether SnapStart is activated for the specified function version.  
*Required*: No  
*Type*: String  
*Allowed values*: `On | Off`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::Function Tag
<a name="aws-properties-lambda-function-tag"></a>

A [tag](https://docs.aws.amazon.com/lambda/latest/dg/tagging.html) to apply to the function.

## Syntax
<a name="aws-properties-lambda-function-tag-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-tag-syntax.json"></a>

```
{
  "[Key](#cfn-lambda-function-tag-key)" : String,
  "[Value](#cfn-lambda-function-tag-value)" : String
}
```

### YAML
<a name="aws-properties-lambda-function-tag-syntax.yaml"></a>

```
  [Key](#cfn-lambda-function-tag-key): String
  [Value](#cfn-lambda-function-tag-value): String
```

## Properties
<a name="aws-properties-lambda-function-tag-properties"></a>

`Key`  <a name="cfn-lambda-function-tag-key"></a>
The key for this tag.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-lambda-function-tag-value"></a>
The value for this tag.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::Function TenancyConfig
<a name="aws-properties-lambda-function-tenancyconfig"></a>

Specifies the tenant isolation mode configuration for a Lambda function. This allows you to configure specific tenant isolation strategies for your function invocations. Tenant isolation configuration cannot be modified after function creation.

## Syntax
<a name="aws-properties-lambda-function-tenancyconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-tenancyconfig-syntax.json"></a>

```
{
  "[TenantIsolationMode](#cfn-lambda-function-tenancyconfig-tenantisolationmode)" : String
}
```

### YAML
<a name="aws-properties-lambda-function-tenancyconfig-syntax.yaml"></a>

```
  [TenantIsolationMode](#cfn-lambda-function-tenancyconfig-tenantisolationmode): String
```

## Properties
<a name="aws-properties-lambda-function-tenancyconfig-properties"></a>

`TenantIsolationMode`  <a name="cfn-lambda-function-tenancyconfig-tenantisolationmode"></a>
Tenant isolation mode allows for invocation to be sent to a corresponding execution environment dedicated to a specific tenant ID.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `PER_TENANT`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Lambda::Function TracingConfig
<a name="aws-properties-lambda-function-tracingconfig"></a>

The function's [AWS X-Ray](https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html) tracing configuration. To sample and record incoming requests, set `Mode` to `Active`.

## Syntax
<a name="aws-properties-lambda-function-tracingconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-tracingconfig-syntax.json"></a>

```
{
  "[Mode](#cfn-lambda-function-tracingconfig-mode)" : String
}
```

### YAML
<a name="aws-properties-lambda-function-tracingconfig-syntax.yaml"></a>

```
  [Mode](#cfn-lambda-function-tracingconfig-mode): String
```

## Properties
<a name="aws-properties-lambda-function-tracingconfig-properties"></a>

`Mode`  <a name="cfn-lambda-function-tracingconfig-mode"></a>
The tracing mode.  
*Required*: No  
*Type*: String  
*Allowed values*: `Active | PassThrough`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-lambda-function-tracingconfig--examples"></a>

### Tracing Configuration
<a name="aws-properties-lambda-function-tracingconfig--examples--Tracing_Configuration"></a>

Enable active tracing on a function.

#### YAML
<a name="aws-properties-lambda-function-tracingconfig--examples--Tracing_Configuration--yaml"></a>

```
      TracingConfig:
        Mode: Active
```

# AWS::Lambda::Function VpcConfig
<a name="aws-properties-lambda-function-vpcconfig"></a>

The VPC security groups and subnets that are attached to a Lambda function. When you connect a function to a VPC, Lambda creates an elastic network interface for each combination of security group and subnet in the function's VPC configuration. The function can only access resources and the internet through that VPC. For more information, see [VPC Settings](https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html).

**Note**  
When you delete a function, CloudFormation monitors the state of its network interfaces and waits for Lambda to delete them before proceeding. If the VPC is defined in the same stack, the network interfaces need to be deleted by Lambda before CloudFormation can delete the VPC's resources.  
To monitor network interfaces, CloudFormation needs the `ec2:DescribeNetworkInterfaces` permission. It obtains this from the user or role that modifies the stack. If you don't provide this permission, CloudFormation does not wait for network interfaces to be deleted.

## Syntax
<a name="aws-properties-lambda-function-vpcconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-function-vpcconfig-syntax.json"></a>

```
{
  "[Ipv6AllowedForDualStack](#cfn-lambda-function-vpcconfig-ipv6allowedfordualstack)" : Boolean,
  "[SecurityGroupIds](#cfn-lambda-function-vpcconfig-securitygroupids)" : [ String, ... ],
  "[SubnetIds](#cfn-lambda-function-vpcconfig-subnetids)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-lambda-function-vpcconfig-syntax.yaml"></a>

```
  [Ipv6AllowedForDualStack](#cfn-lambda-function-vpcconfig-ipv6allowedfordualstack): Boolean
  [SecurityGroupIds](#cfn-lambda-function-vpcconfig-securitygroupids): 
    - String
  [SubnetIds](#cfn-lambda-function-vpcconfig-subnetids): 
    - String
```

## Properties
<a name="aws-properties-lambda-function-vpcconfig-properties"></a>

`Ipv6AllowedForDualStack`  <a name="cfn-lambda-function-vpcconfig-ipv6allowedfordualstack"></a>
Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecurityGroupIds`  <a name="cfn-lambda-function-vpcconfig-securitygroupids"></a>
A list of VPC security group IDs.  
*Required*: No  
*Type*: Array of String  
*Maximum*: `5`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SubnetIds`  <a name="cfn-lambda-function-vpcconfig-subnetids"></a>
A list of VPC subnet IDs.  
*Required*: No  
*Type*: Array of String  
*Maximum*: `16`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-lambda-function-vpcconfig--examples"></a>

### VPC Configuration
<a name="aws-properties-lambda-function-vpcconfig--examples--VPC_Configuration"></a>

Connect a function to a VPC.

#### YAML
<a name="aws-properties-lambda-function-vpcconfig--examples--VPC_Configuration--yaml"></a>

```
      VpcConfig:
        SecurityGroupIds:
          - sg-085912345678492fb
        SubnetIds:
          - subnet-071f712345678e7c8
          - subnet-07fd123456788a036
```

# AWS::Lambda::LayerVersion
<a name="aws-resource-lambda-layerversion"></a>

The `AWS::Lambda::LayerVersion` resource creates a [Lambda layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) from a ZIP archive.

## Syntax
<a name="aws-resource-lambda-layerversion-syntax"></a>

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

### JSON
<a name="aws-resource-lambda-layerversion-syntax.json"></a>

```
{
  "Type" : "AWS::Lambda::LayerVersion",
  "Properties" : {
      "[CompatibleArchitectures](#cfn-lambda-layerversion-compatiblearchitectures)" : [ String, ... ],
      "[CompatibleRuntimes](#cfn-lambda-layerversion-compatibleruntimes)" : [ String, ... ],
      "[Content](#cfn-lambda-layerversion-content)" : Content,
      "[Description](#cfn-lambda-layerversion-description)" : String,
      "[LayerName](#cfn-lambda-layerversion-layername)" : String,
      "[LicenseInfo](#cfn-lambda-layerversion-licenseinfo)" : String
    }
}
```

### YAML
<a name="aws-resource-lambda-layerversion-syntax.yaml"></a>

```
Type: AWS::Lambda::LayerVersion
Properties:
  [CompatibleArchitectures](#cfn-lambda-layerversion-compatiblearchitectures): 
    - String
  [CompatibleRuntimes](#cfn-lambda-layerversion-compatibleruntimes): 
    - String
  [Content](#cfn-lambda-layerversion-content): 
    Content
  [Description](#cfn-lambda-layerversion-description): String
  [LayerName](#cfn-lambda-layerversion-layername): String
  [LicenseInfo](#cfn-lambda-layerversion-licenseinfo): String
```

## Properties
<a name="aws-resource-lambda-layerversion-properties"></a>

`CompatibleArchitectures`  <a name="cfn-lambda-layerversion-compatiblearchitectures"></a>
A list of compatible [instruction set architectures](https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html).  
*Required*: No  
*Type*: Array of String  
*Minimum*: `0`  
*Maximum*: `2`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`CompatibleRuntimes`  <a name="cfn-lambda-layerversion-compatibleruntimes"></a>
A list of compatible [function runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html). Used for filtering with [ListLayers](https://docs.aws.amazon.com/lambda/latest/dg/API_ListLayers.html) and [ListLayerVersions](https://docs.aws.amazon.com/lambda/latest/dg/API_ListLayerVersions.html).  
*Required*: No  
*Type*: Array of String  
*Minimum*: `0`  
*Maximum*: `15`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Content`  <a name="cfn-lambda-layerversion-content"></a>
The function layer archive.  
*Required*: Yes  
*Type*: [Content](aws-properties-lambda-layerversion-content.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Description`  <a name="cfn-lambda-layerversion-description"></a>
The description of the version.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LayerName`  <a name="cfn-lambda-layerversion-layername"></a>
The name or Amazon Resource Name (ARN) of the layer.  
*Required*: No  
*Type*: String  
*Pattern*: `(arn:[a-zA-Z0-9-]+:lambda:[a-zA-Z0-9-]+:\d{12}:layer:[a-zA-Z0-9-_]+)|[a-zA-Z0-9-_]+`  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LicenseInfo`  <a name="cfn-lambda-layerversion-licenseinfo"></a>
The layer's software license. It can be any of the following:  
+ An [SPDX license identifier](https://spdx.org/licenses/). For example, `MIT`.
+ The URL of a license hosted on the internet. For example, `https://opensource.org/licenses/MIT`.
+ The full text of the license.
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `512`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-lambda-layerversion-return-values"></a>

### Ref
<a name="aws-resource-lambda-layerversion-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ARN of the layer version, such as `arn:aws:lambda:us-east-2:123456789012:layer:my-layer:1`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-lambda-layerversion-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-lambda-layerversion-return-values-fn--getatt-fn--getatt"></a>

`LayerVersionArn`  <a name="LayerVersionArn-fn::getatt"></a>
The ARN of the layer version.

## Examples
<a name="aws-resource-lambda-layerversion--examples"></a>



### Layer Version
<a name="aws-resource-lambda-layerversion--examples--Layer_Version"></a>

Create a layer named `my-layer`.

#### JSON
<a name="aws-resource-lambda-layerversion--examples--Layer_Version--json"></a>

```
"MyLayer": {
    "Type": "AWS::Lambda::LayerVersion",
    "Properties": {
        "CompatibleRuntimes": [
            "python3.12",
            "python3.11"
        ],
        "Content": {
            "S3Bucket": "amzn-s3-demo-bucket",
            "S3Key": "layer.zip"
        },
        "Description": "My layer",
        "LayerName": "my-layer",
        "LicenseInfo": "MIT"
    }
}
```

#### YAML
<a name="aws-resource-lambda-layerversion--examples--Layer_Version--yaml"></a>

```
MyLayer:
  Type: AWS::Lambda::LayerVersion
  Properties:
    CompatibleRuntimes:
      - python3.12
      - python3.11
    Content:
      S3Bucket: amzn-s3-demo-bucket
      S3Key: layer.zip
    Description: My layer
    LayerName: my-layer
    LicenseInfo: MIT
```

# AWS::Lambda::LayerVersion Content
<a name="aws-properties-lambda-layerversion-content"></a>

A ZIP archive that contains the contents of an [Lambda layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).

## Syntax
<a name="aws-properties-lambda-layerversion-content-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-layerversion-content-syntax.json"></a>

```
{
  "[S3Bucket](#cfn-lambda-layerversion-content-s3bucket)" : String,
  "[S3Key](#cfn-lambda-layerversion-content-s3key)" : String,
  "[S3ObjectVersion](#cfn-lambda-layerversion-content-s3objectversion)" : String
}
```

### YAML
<a name="aws-properties-lambda-layerversion-content-syntax.yaml"></a>

```
  [S3Bucket](#cfn-lambda-layerversion-content-s3bucket): String
  [S3Key](#cfn-lambda-layerversion-content-s3key): String
  [S3ObjectVersion](#cfn-lambda-layerversion-content-s3objectversion): String
```

## Properties
<a name="aws-properties-lambda-layerversion-content-properties"></a>

`S3Bucket`  <a name="cfn-lambda-layerversion-content-s3bucket"></a>
The Amazon S3 bucket of the layer archive.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[0-9A-Za-z\.\-_]*(?<!\.)`  
*Minimum*: `3`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`S3Key`  <a name="cfn-lambda-layerversion-content-s3key"></a>
The Amazon S3 key of the layer archive.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`S3ObjectVersion`  <a name="cfn-lambda-layerversion-content-s3objectversion"></a>
For versioned objects, the version of the layer archive object to use.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Examples
<a name="aws-properties-lambda-layerversion-content--examples"></a>



### Layer Content
<a name="aws-properties-lambda-layerversion-content--examples--Layer_Content"></a>

The location of a layer archive in Amazon S3.

#### JSON
<a name="aws-properties-lambda-layerversion-content--examples--Layer_Content--json"></a>

```
        "Content": {
            "S3Bucket": "amzn-s3-demo-bucket",
            "S3Key": "layer.zip"
        }
```

#### YAML
<a name="aws-properties-lambda-layerversion-content--examples--Layer_Content--yaml"></a>

```
    Content:
      S3Bucket: amzn-s3-demo-bucket
      S3Key: layer.zip
```

# AWS::Lambda::LayerVersionPermission
<a name="aws-resource-lambda-layerversionpermission"></a>

The `AWS::Lambda::LayerVersionPermission` resource adds permissions to the resource-based policy of a version of an [Lambda layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). Use this action to grant layer usage permission to other accounts. You can grant permission to a single account, all AWS accounts, or all accounts in an organization.

**Important**  
Since the release of the [UpdateReplacePolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html) both `UpdateReplacePolicy` and `DeletionPolicy` are required to protect your Resources/LayerPermissions from deletion.

## Syntax
<a name="aws-resource-lambda-layerversionpermission-syntax"></a>

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

### JSON
<a name="aws-resource-lambda-layerversionpermission-syntax.json"></a>

```
{
  "Type" : "AWS::Lambda::LayerVersionPermission",
  "Properties" : {
      "[Action](#cfn-lambda-layerversionpermission-action)" : String,
      "[LayerVersionArn](#cfn-lambda-layerversionpermission-layerversionarn)" : String,
      "[OrganizationId](#cfn-lambda-layerversionpermission-organizationid)" : String,
      "[Principal](#cfn-lambda-layerversionpermission-principal)" : String
    }
}
```

### YAML
<a name="aws-resource-lambda-layerversionpermission-syntax.yaml"></a>

```
Type: AWS::Lambda::LayerVersionPermission
Properties:
  [Action](#cfn-lambda-layerversionpermission-action): String
  [LayerVersionArn](#cfn-lambda-layerversionpermission-layerversionarn): String
  [OrganizationId](#cfn-lambda-layerversionpermission-organizationid): String
  [Principal](#cfn-lambda-layerversionpermission-principal): String
```

## Properties
<a name="aws-resource-lambda-layerversionpermission-properties"></a>

`Action`  <a name="cfn-lambda-layerversionpermission-action"></a>
The API action that grants access to the layer. For example, `lambda:GetLayerVersion`.  
*Required*: Yes  
*Type*: String  
*Pattern*: `lambda:GetLayerVersion`  
*Minimum*: `0`  
*Maximum*: `22`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LayerVersionArn`  <a name="cfn-lambda-layerversionpermission-layerversionarn"></a>
The name or Amazon Resource Name (ARN) of the layer.  
*Required*: Yes  
*Type*: String  
*Pattern*: `(arn:[a-zA-Z0-9-]+:lambda:[a-zA-Z0-9-]+:\d{12}:layer:[a-zA-Z0-9-_]+)|[a-zA-Z0-9-_]+`  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`OrganizationId`  <a name="cfn-lambda-layerversionpermission-organizationid"></a>
With the principal set to `*`, grant permission to all accounts in the specified organization.  
*Required*: No  
*Type*: String  
*Pattern*: `o-[a-z0-9]{10,32}`  
*Minimum*: `0`  
*Maximum*: `34`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Principal`  <a name="cfn-lambda-layerversionpermission-principal"></a>
An account ID, or `*` to grant layer usage permission to all accounts in an organization, or all AWS accounts (if `organizationId` is not specified). For the last case, make sure that you really do want all AWS accounts to have usage permission to this layer.   
*Required*: Yes  
*Type*: String  
*Pattern*: `\d{12}|\*|arn:(aws[a-zA-Z-]*):iam::\d{12}:root`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-lambda-layerversionpermission-return-values"></a>

### Ref
<a name="aws-resource-lambda-layerversionpermission-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the layer version ARN and statement ID, such as `arn:aws:lambda:us-east-2:123456789012:layer:my-layer:1#engineering-org`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-lambda-layerversionpermission-return-values-fn--getatt"></a>

## Examples
<a name="aws-resource-lambda-layerversionpermission--examples"></a>



### Layer Version Permission
<a name="aws-resource-lambda-layerversionpermission--examples--Layer_Version_Permission"></a>

Grant layer use permission to accounts in organization `o-t194hfs8cz`.

#### JSON
<a name="aws-resource-lambda-layerversionpermission--examples--Layer_Version_Permission--json"></a>

```
"MyLayerPermission": {
    "Type": "AWS::Lambda::LayerVersionPermission",
    "Properties": {
        "Action": "lambda:GetLayerVersion",
        "LayerVersionArn": "arn:aws:lambda:us-east-2:123456789012:layer:my-layer:1",
        "OrganizationId": "o-t194hfs8cz",
        "Principal": "*"
    }
}
```

#### YAML
<a name="aws-resource-lambda-layerversionpermission--examples--Layer_Version_Permission--yaml"></a>

```
MyLayerPermission:
  Type: AWS::Lambda::LayerVersionPermission
  Properties:
    Action: lambda:GetLayerVersion
    LayerVersionArn: arn:aws:lambda:us-east-2:123456789012:layer:my-layer:1
    OrganizationId: o-t194hfs8cz
    Principal: *
```

# AWS::Lambda::Permission
<a name="aws-resource-lambda-permission"></a>

The `AWS::Lambda::Permission` resource grants an AWS service or another account permission to use a function. You can apply the policy at the function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function.

To grant permission to another account, specify the account ID as the `Principal`. To grant permission to an organization defined in AWS Organizations, specify the organization ID as the `PrincipalOrgID`. For AWS services, the principal is a domain-style identifier defined by the service, like `s3.amazonaws.com` or `sns.amazonaws.com`. For AWS services, you can also specify the ARN of the associated resource as the `SourceArn`. If you grant permission to a service principal without specifying the source, other accounts could potentially configure resources in their account to invoke your Lambda function.

If your function has a function URL, you can specify the `FunctionUrlAuthType` parameter. This adds a condition to your permission that only applies when your function URL's `AuthType` matches the specified `FunctionUrlAuthType`. For more information about the `AuthType` parameter, see [Control access to Lambda function URLs](https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html).

This resource adds a statement to a resource-based permission policy for the function. For more information about function policies, see [Lambda Function Policies](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html).

## Syntax
<a name="aws-resource-lambda-permission-syntax"></a>

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

### JSON
<a name="aws-resource-lambda-permission-syntax.json"></a>

```
{
  "Type" : "AWS::Lambda::Permission",
  "Properties" : {
      "[Action](#cfn-lambda-permission-action)" : String,
      "[EventSourceToken](#cfn-lambda-permission-eventsourcetoken)" : String,
      "[FunctionName](#cfn-lambda-permission-functionname)" : String,
      "[FunctionUrlAuthType](#cfn-lambda-permission-functionurlauthtype)" : String,
      "[InvokedViaFunctionUrl](#cfn-lambda-permission-invokedviafunctionurl)" : Boolean,
      "[Principal](#cfn-lambda-permission-principal)" : String,
      "[PrincipalOrgID](#cfn-lambda-permission-principalorgid)" : String,
      "[SourceAccount](#cfn-lambda-permission-sourceaccount)" : String,
      "[SourceArn](#cfn-lambda-permission-sourcearn)" : String
    }
}
```

### YAML
<a name="aws-resource-lambda-permission-syntax.yaml"></a>

```
Type: AWS::Lambda::Permission
Properties:
  [Action](#cfn-lambda-permission-action): String
  [EventSourceToken](#cfn-lambda-permission-eventsourcetoken): String
  [FunctionName](#cfn-lambda-permission-functionname): String
  [FunctionUrlAuthType](#cfn-lambda-permission-functionurlauthtype): String
  [InvokedViaFunctionUrl](#cfn-lambda-permission-invokedviafunctionurl): Boolean
  [Principal](#cfn-lambda-permission-principal): String
  [PrincipalOrgID](#cfn-lambda-permission-principalorgid): String
  [SourceAccount](#cfn-lambda-permission-sourceaccount): String
  [SourceArn](#cfn-lambda-permission-sourcearn): String
```

## Properties
<a name="aws-resource-lambda-permission-properties"></a>

`Action`  <a name="cfn-lambda-permission-action"></a>
The action that the principal can use on the function. For example, `lambda:InvokeFunction` or `lambda:GetFunction`.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^(lambda:[*]|lambda:[a-zA-Z]+|[*])$`  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EventSourceToken`  <a name="cfn-lambda-permission-eventsourcetoken"></a>
For Alexa Smart Home functions, a token that the invoker must supply.  
*Required*: No  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9._\-]+$`  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FunctionName`  <a name="cfn-lambda-permission-functionname"></a>
The name or ARN of the Lambda function, version, or alias.  

**Name formats**
+ **Function name** – `my-function` (name-only), `my-function:v1` (with alias).
+ **Function ARN** – `arn:aws:lambda:us-west-2:123456789012:function:my-function`.
+ **Partial ARN** – `123456789012:function:my-function`.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^(arn:(aws[a-zA-Z-]*)?:lambda:)?((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?$`  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FunctionUrlAuthType`  <a name="cfn-lambda-permission-functionurlauthtype"></a>
The type of authentication that your function URL uses. Set to `AWS_IAM` if you want to restrict access to authenticated users only. Set to `NONE` if you want to bypass IAM authentication to create a public endpoint. For more information, see [Control access to Lambda function URLs](https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html).  
*Required*: No  
*Type*: String  
*Allowed values*: `AWS_IAM | NONE`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`InvokedViaFunctionUrl`  <a name="cfn-lambda-permission-invokedviafunctionurl"></a>
Indicates whether the permission applies when the function is invoked through a function URL.   
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Principal`  <a name="cfn-lambda-permission-principal"></a>
The AWS service, AWS account, IAM user, or IAM role that invokes the function. If you specify a service, use `SourceArn` or `SourceAccount` to limit who can invoke the function through that service.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^.*$`  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PrincipalOrgID`  <a name="cfn-lambda-permission-principalorgid"></a>
The identifier for your organization in AWS Organizations. Use this to grant permissions to all the AWS accounts under this organization.  
*Required*: No  
*Type*: String  
*Pattern*: `^o-[a-z0-9]{10,32}$`  
*Minimum*: `12`  
*Maximum*: `34`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourceAccount`  <a name="cfn-lambda-permission-sourceaccount"></a>
For AWS service, the ID of the AWS account that owns the resource. Use this together with `SourceArn` to ensure that the specified account owns the resource. It is possible for an Amazon S3 bucket to be deleted by its owner and recreated by another account.  
*Required*: No  
*Type*: String  
*Pattern*: `^\d{12}$`  
*Minimum*: `12`  
*Maximum*: `12`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourceArn`  <a name="cfn-lambda-permission-sourcearn"></a>
For AWS services, the ARN of the AWS resource that invokes the function. For example, an Amazon S3 bucket or Amazon SNS topic.  
Note that Lambda configures the comparison using the `StringLike` operator.  
*Required*: No  
*Type*: String  
*Pattern*: `^arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1})?:(\d{12})?:(.*)$`  
*Minimum*: `12`  
*Maximum*: `1024`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Examples
<a name="aws-resource-lambda-permission--examples"></a>



**Topics**
+ [Cross Account Invoke](#aws-resource-lambda-permission--examples--Cross_Account_Invoke)
+ [Public Function URL Invoke](#aws-resource-lambda-permission--examples--Public_Function_URL_Invoke)
+ [Amazon S3 Notifications](#aws-resource-lambda-permission--examples--Amazon_S3_Notifications)

### Cross Account Invoke
<a name="aws-resource-lambda-permission--examples--Cross_Account_Invoke"></a>

Grant account 123456789012 permission to invoke a function resource named `lambdaFunction` created in the same template.

#### YAML
<a name="aws-resource-lambda-permission--examples--Cross_Account_Invoke--yaml"></a>

```
  permission:
    Type: AWS::Lambda::Permission
    Properties:
      FunctionName: !Ref lambdaFunction
      Action: lambda:InvokeFunction
      Principal: 123456789012
```

### Public Function URL Invoke
<a name="aws-resource-lambda-permission--examples--Public_Function_URL_Invoke"></a>

Grant public, unauthenticated access to invoke your function named `lambdaFunction` via its function URL.

#### YAML
<a name="aws-resource-lambda-permission--examples--Public_Function_URL_Invoke--yaml"></a>

```
  permissionForURLInvoke:
     Type: AWS::Lambda::Permission
     Properties:
       FunctionName: !Ref lambdaFunction
       FunctionUrlAuthType: 'NONE'
       Action: lambda:InvokeFunctionUrl
       Principal: '*'
```

### Amazon S3 Notifications
<a name="aws-resource-lambda-permission--examples--Amazon_S3_Notifications"></a>

Grant Amazon S3 permission to invoke a function resource named `function` created in the same template, to process notifications for a bucket resource named `bucket`.

#### JSON
<a name="aws-resource-lambda-permission--examples--Amazon_S3_Notifications--json"></a>

```
"s3Permission": {
    "Type": "AWS::Lambda::Permission",
    "Properties": {
        "FunctionName": {
            "Fn::GetAtt": [
                "function",
                "Arn"
            ]
        },
        "Action": "lambda:InvokeFunction",
        "Principal": "s3.amazonaws.com",
        "SourceAccount": {
            "Ref": "AWS::AccountId"
        },
        "SourceArn": {
            "Fn::GetAtt": [
                "bucket",
                "Arn"
            ]
        }
    }
}
```

#### YAML
<a name="aws-resource-lambda-permission--examples--Amazon_S3_Notifications--yaml"></a>

```
s3Permission:
  Type: AWS::Lambda::Permission
  Properties:
    FunctionName: !GetAtt function.Arn
    Action: lambda:InvokeFunction
    Principal: s3.amazonaws.com
    SourceAccount: !Ref 'AWS::AccountId'
    SourceArn: !GetAtt bucket.Arn
```

# AWS::Lambda::Url
<a name="aws-resource-lambda-url"></a>

The `AWS::Lambda::Url` resource creates a function URL with the specified configuration parameters. A [function URL](https://docs.aws.amazon.com/lambda/latest/dg/lambda-urls.html) is a dedicated HTTP(S) endpoint that you can use to invoke your function.

## Syntax
<a name="aws-resource-lambda-url-syntax"></a>

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

### JSON
<a name="aws-resource-lambda-url-syntax.json"></a>

```
{
  "Type" : "AWS::Lambda::Url",
  "Properties" : {
      "[AuthType](#cfn-lambda-url-authtype)" : String,
      "[Cors](#cfn-lambda-url-cors)" : Cors,
      "[InvokeMode](#cfn-lambda-url-invokemode)" : String,
      "[Qualifier](#cfn-lambda-url-qualifier)" : String,
      "[TargetFunctionArn](#cfn-lambda-url-targetfunctionarn)" : String
    }
}
```

### YAML
<a name="aws-resource-lambda-url-syntax.yaml"></a>

```
Type: AWS::Lambda::Url
Properties:
  [AuthType](#cfn-lambda-url-authtype): String
  [Cors](#cfn-lambda-url-cors): 
    Cors
  [InvokeMode](#cfn-lambda-url-invokemode): String
  [Qualifier](#cfn-lambda-url-qualifier): String
  [TargetFunctionArn](#cfn-lambda-url-targetfunctionarn): String
```

## Properties
<a name="aws-resource-lambda-url-properties"></a>

`AuthType`  <a name="cfn-lambda-url-authtype"></a>
The type of authentication that your function URL uses. Set to `AWS_IAM` if you want to restrict access to authenticated users only. Set to `NONE` if you want to bypass IAM authentication to create a public endpoint. For more information, see [Security and auth model for Lambda function URLs](https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html).  
*Required*: Yes  
*Type*: String  
*Allowed values*: `AWS_IAM | NONE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Cors`  <a name="cfn-lambda-url-cors"></a>
The [Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) settings for your function URL.  
*Required*: No  
*Type*: [Cors](aws-properties-lambda-url-cors.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InvokeMode`  <a name="cfn-lambda-url-invokemode"></a>
Use one of the following options:  
+ `BUFFERED` – This is the default option. Lambda invokes your function using the `Invoke` API operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB.
+ `RESPONSE_STREAM` – Your function streams payload results as they become available. Lambda invokes your function using the `InvokeWithResponseStream` API operation. The maximum response payload size is 200 MB.
*Required*: No  
*Type*: String  
*Allowed values*: `BUFFERED | RESPONSE_STREAM`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Qualifier`  <a name="cfn-lambda-url-qualifier"></a>
The alias name.  
*Required*: No  
*Type*: String  
*Pattern*: `((?!^[0-9]+$)([a-zA-Z0-9-_]+))`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`TargetFunctionArn`  <a name="cfn-lambda-url-targetfunctionarn"></a>
The name of the Lambda function.  

**Name formats**
+ **Function name** - `my-function`.
+ **Function ARN** - `arn:aws:lambda:us-east-2:123456789012:function:my-function`.
+ **Partial ARN** - `123456789012:function:my-function`.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:((?!\d+)[0-9a-zA-Z-_]+))?$`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-lambda-url-return-values"></a>

### Ref
<a name="aws-resource-lambda-url-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the resource name.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-lambda-url-return-values-fn--getatt"></a>

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 [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-lambda-url-return-values-fn--getatt-fn--getatt"></a>

`FunctionArn`  <a name="FunctionArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the function.

`FunctionUrl`  <a name="FunctionUrl-fn::getatt"></a>
The HTTP URL endpoint for your function.

# AWS::Lambda::Url Cors
<a name="aws-properties-lambda-url-cors"></a>

The [Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) settings for your function URL. Use CORS to grant access to your function URL from any origin. You can also use CORS to control access for specific HTTP headers and methods in requests to your function URL.

## Syntax
<a name="aws-properties-lambda-url-cors-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-url-cors-syntax.json"></a>

```
{
  "[AllowCredentials](#cfn-lambda-url-cors-allowcredentials)" : Boolean,
  "[AllowHeaders](#cfn-lambda-url-cors-allowheaders)" : [ String, ... ],
  "[AllowMethods](#cfn-lambda-url-cors-allowmethods)" : [ String, ... ],
  "[AllowOrigins](#cfn-lambda-url-cors-alloworigins)" : [ String, ... ],
  "[ExposeHeaders](#cfn-lambda-url-cors-exposeheaders)" : [ String, ... ],
  "[MaxAge](#cfn-lambda-url-cors-maxage)" : Integer
}
```

### YAML
<a name="aws-properties-lambda-url-cors-syntax.yaml"></a>

```
  [AllowCredentials](#cfn-lambda-url-cors-allowcredentials): Boolean
  [AllowHeaders](#cfn-lambda-url-cors-allowheaders): 
    - String
  [AllowMethods](#cfn-lambda-url-cors-allowmethods): 
    - String
  [AllowOrigins](#cfn-lambda-url-cors-alloworigins): 
    - String
  [ExposeHeaders](#cfn-lambda-url-cors-exposeheaders): 
    - String
  [MaxAge](#cfn-lambda-url-cors-maxage): Integer
```

## Properties
<a name="aws-properties-lambda-url-cors-properties"></a>

`AllowCredentials`  <a name="cfn-lambda-url-cors-allowcredentials"></a>
Whether you want to allow cookies or other credentials in requests to your function URL. The default is `false`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AllowHeaders`  <a name="cfn-lambda-url-cors-allowheaders"></a>
The HTTP headers that origins can include in requests to your function URL. For example: `Date`, `Keep-Alive`, `X-Custom-Header`.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1 | 1`  
*Maximum*: `1024 | 100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AllowMethods`  <a name="cfn-lambda-url-cors-allowmethods"></a>
The HTTP methods that are allowed when calling your function URL. For example: `GET`, `POST`, `DELETE`, or the wildcard character (`*`).  
*Required*: No  
*Type*: Array of String  
*Allowed values*: `GET | PUT | HEAD | POST | PATCH | DELETE | *`  
*Minimum*: `1`  
*Maximum*: `6`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AllowOrigins`  <a name="cfn-lambda-url-cors-alloworigins"></a>
The origins that can access your function URL. You can list any number of specific origins, separated by a comma. For example: `https://www.example.com`, `http://localhost:60905`.  
Alternatively, you can grant access to all origins with the wildcard character (`*`).   
*Required*: No  
*Type*: Array of String  
*Minimum*: `1 | 1`  
*Maximum*: `253 | 100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ExposeHeaders`  <a name="cfn-lambda-url-cors-exposeheaders"></a>
The HTTP headers in your function response that you want to expose to origins that call your function URL. For example: `Date`, `Keep-Alive`, `X-Custom-Header`.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1 | 1`  
*Maximum*: `1024 | 100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaxAge`  <a name="cfn-lambda-url-cors-maxage"></a>
The maximum amount of time, in seconds, that browsers can cache results of a preflight request. By default, this is set to `0`, which means the browser will not cache results.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `86400`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::Version
<a name="aws-resource-lambda-version"></a>

The `AWS::Lambda::Version` resource creates a [version](https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html) from the current code and configuration of a function. Use versions to create a snapshot of your function code and configuration that doesn't change.

## Syntax
<a name="aws-resource-lambda-version-syntax"></a>

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

### JSON
<a name="aws-resource-lambda-version-syntax.json"></a>

```
{
  "Type" : "AWS::Lambda::Version",
  "Properties" : {
      "[CodeSha256](#cfn-lambda-version-codesha256)" : String,
      "[Description](#cfn-lambda-version-description)" : String,
      "[FunctionName](#cfn-lambda-version-functionname)" : String,
      "[FunctionScalingConfig](#cfn-lambda-version-functionscalingconfig)" : FunctionScalingConfig,
      "[ProvisionedConcurrencyConfig](#cfn-lambda-version-provisionedconcurrencyconfig)" : ProvisionedConcurrencyConfiguration,
      "[RuntimePolicy](#cfn-lambda-version-runtimepolicy)" : RuntimePolicy
    }
}
```

### YAML
<a name="aws-resource-lambda-version-syntax.yaml"></a>

```
Type: AWS::Lambda::Version
Properties:
  [CodeSha256](#cfn-lambda-version-codesha256): String
  [Description](#cfn-lambda-version-description): String
  [FunctionName](#cfn-lambda-version-functionname): String
  [FunctionScalingConfig](#cfn-lambda-version-functionscalingconfig): 
    FunctionScalingConfig
  [ProvisionedConcurrencyConfig](#cfn-lambda-version-provisionedconcurrencyconfig): 
    ProvisionedConcurrencyConfiguration
  [RuntimePolicy](#cfn-lambda-version-runtimepolicy): 
    RuntimePolicy
```

## Properties
<a name="aws-resource-lambda-version-properties"></a>

`CodeSha256`  <a name="cfn-lambda-version-codesha256"></a>
Only publish a version if the hash value matches the value that's specified. Use this option to avoid publishing a version if the function code has changed since you last updated it. Updates are not supported for this property.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Description`  <a name="cfn-lambda-version-description"></a>
A description for the version to override the description in the function configuration. Updates are not supported for this property.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FunctionName`  <a name="cfn-lambda-version-functionname"></a>
The name or ARN of the Lambda function.  

**Name formats**
+ **Function name** - `MyFunction`.
+ **Function ARN** - `arn:aws:lambda:us-west-2:123456789012:function:MyFunction`.
+ **Partial ARN** - `123456789012:function:MyFunction`.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^(arn:(aws[a-zA-Z-]*)?:lambda:)?((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?$`  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FunctionScalingConfig`  <a name="cfn-lambda-version-functionscalingconfig"></a>
Configuration that defines the scaling behavior for a Lambda Managed Instances function, including the minimum and maximum number of execution environments that can be provisioned.  
*Required*: No  
*Type*: [FunctionScalingConfig](aws-properties-lambda-version-functionscalingconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ProvisionedConcurrencyConfig`  <a name="cfn-lambda-version-provisionedconcurrencyconfig"></a>
Specifies a provisioned concurrency configuration for a function's version. Updates are not supported for this property.  
*Required*: No  
*Type*: [ProvisionedConcurrencyConfiguration](aws-properties-lambda-version-provisionedconcurrencyconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RuntimePolicy`  <a name="cfn-lambda-version-runtimepolicy"></a>
Property description not available.  
*Required*: No  
*Type*: [RuntimePolicy](aws-properties-lambda-version-runtimepolicy.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-lambda-version-return-values"></a>

### Ref
<a name="aws-resource-lambda-version-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ARN of the version, such as `arn:aws:lambda:us-east-2:123456789012:function:helloworld:1`. 

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-lambda-version-return-values-fn--getatt"></a>

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 [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-lambda-version-return-values-fn--getatt-fn--getatt"></a>

`FunctionArn`  <a name="FunctionArn-fn::getatt"></a>
The ARN of the function.

`Version`  <a name="Version-fn::getatt"></a>
The version number.

## Examples
<a name="aws-resource-lambda-version--examples"></a>



### Function Version
<a name="aws-resource-lambda-version--examples--Function_Version"></a>

Publish a version with provisioned concurrency.

#### YAML
<a name="aws-resource-lambda-version--examples--Function_Version--yaml"></a>

```
Resources:
  function:
    Type: AWS::Lambda::Function
    Properties:
      Handler: index.handler
      Role: arn:aws:iam::123456789012:role/lambda-role
      Code:
        ZipFile: |
          exports.handler = async (event) => {
              console.log(JSON.stringify(event, null, 2));
              const response = {
                  statusCode: 200,
                  body: JSON.stringify('Hello from Lambda!'),
              };
              return response;
          };
      Runtime: nodejs18.x
      TracingConfig:
        Mode: Active
  version:
    Type: AWS::Lambda::Version
    Properties:
      FunctionName: !Ref function
      Description: v1
      ProvisionedConcurrencyConfig:
        ProvisionedConcurrentExecutions: 20
```

# AWS::Lambda::Version FunctionScalingConfig
<a name="aws-properties-lambda-version-functionscalingconfig"></a>

Configuration that defines the scaling behavior for a Lambda Managed Instances function, including the minimum and maximum number of execution environments that can be provisioned.

## Syntax
<a name="aws-properties-lambda-version-functionscalingconfig-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-version-functionscalingconfig-syntax.json"></a>

```
{
  "[MaxExecutionEnvironments](#cfn-lambda-version-functionscalingconfig-maxexecutionenvironments)" : Integer,
  "[MinExecutionEnvironments](#cfn-lambda-version-functionscalingconfig-minexecutionenvironments)" : Integer
}
```

### YAML
<a name="aws-properties-lambda-version-functionscalingconfig-syntax.yaml"></a>

```
  [MaxExecutionEnvironments](#cfn-lambda-version-functionscalingconfig-maxexecutionenvironments): Integer
  [MinExecutionEnvironments](#cfn-lambda-version-functionscalingconfig-minexecutionenvironments): Integer
```

## Properties
<a name="aws-properties-lambda-version-functionscalingconfig-properties"></a>

`MaxExecutionEnvironments`  <a name="cfn-lambda-version-functionscalingconfig-maxexecutionenvironments"></a>
The maximum number of execution environments that can be provisioned for the function.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MinExecutionEnvironments`  <a name="cfn-lambda-version-functionscalingconfig-minexecutionenvironments"></a>
The minimum number of execution environments to maintain for the function.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lambda::Version ProvisionedConcurrencyConfiguration
<a name="aws-properties-lambda-version-provisionedconcurrencyconfiguration"></a>

A [provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html) configuration for a function's version.

## Syntax
<a name="aws-properties-lambda-version-provisionedconcurrencyconfiguration-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-version-provisionedconcurrencyconfiguration-syntax.json"></a>

```
{
  "[ProvisionedConcurrentExecutions](#cfn-lambda-version-provisionedconcurrencyconfiguration-provisionedconcurrentexecutions)" : Integer
}
```

### YAML
<a name="aws-properties-lambda-version-provisionedconcurrencyconfiguration-syntax.yaml"></a>

```
  [ProvisionedConcurrentExecutions](#cfn-lambda-version-provisionedconcurrencyconfiguration-provisionedconcurrentexecutions): Integer
```

## Properties
<a name="aws-properties-lambda-version-provisionedconcurrencyconfiguration-properties"></a>

`ProvisionedConcurrentExecutions`  <a name="cfn-lambda-version-provisionedconcurrencyconfiguration-provisionedconcurrentexecutions"></a>
The amount of provisioned concurrency to allocate for the version.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Examples
<a name="aws-properties-lambda-version-provisionedconcurrencyconfiguration--examples"></a>



### Provisioned Concurrency Configuration
<a name="aws-properties-lambda-version-provisionedconcurrencyconfiguration--examples--Provisioned_Concurrency_Configuration"></a>

Allocate 20 provisioned concurrency for a version.

#### YAML
<a name="aws-properties-lambda-version-provisionedconcurrencyconfiguration--examples--Provisioned_Concurrency_Configuration--yaml"></a>

```
      ProvisionedConcurrencyConfig:
        ProvisionedConcurrentExecutions: 20
```

# AWS::Lambda::Version RuntimePolicy
<a name="aws-properties-lambda-version-runtimepolicy"></a>

Sets the runtime management configuration for a function's version. For more information, see [Runtime updates](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html).

## Syntax
<a name="aws-properties-lambda-version-runtimepolicy-syntax"></a>

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

### JSON
<a name="aws-properties-lambda-version-runtimepolicy-syntax.json"></a>

```
{
  "[RuntimeVersionArn](#cfn-lambda-version-runtimepolicy-runtimeversionarn)" : String,
  "[UpdateRuntimeOn](#cfn-lambda-version-runtimepolicy-updateruntimeon)" : String
}
```

### YAML
<a name="aws-properties-lambda-version-runtimepolicy-syntax.yaml"></a>

```
  [RuntimeVersionArn](#cfn-lambda-version-runtimepolicy-runtimeversionarn): String
  [UpdateRuntimeOn](#cfn-lambda-version-runtimepolicy-updateruntimeon): String
```

## Properties
<a name="aws-properties-lambda-version-runtimepolicy-properties"></a>

`RuntimeVersionArn`  <a name="cfn-lambda-version-runtimepolicy-runtimeversionarn"></a>
The ARN of the runtime version you want the function to use.  
This is only required if you're using the **Manual** runtime update mode.
*Required*: No  
*Type*: String  
*Pattern*: `^arn:(aws[a-zA-Z-]*):lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}::runtime:.+$`  
*Minimum*: `26`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`UpdateRuntimeOn`  <a name="cfn-lambda-version-runtimepolicy-updateruntimeon"></a>
Specify the runtime update mode.  
+ **Auto (default)** - Automatically update to the most recent and secure runtime version using a [Two-phase runtime version rollout](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase). This is the best choice for most customers to ensure they always benefit from runtime updates.
+ **FunctionUpdate** - Lambda updates the runtime of you function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.
+ **Manual** - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see [Roll back a runtime version](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback).
*Valid Values*: `Auto` \$1 `FunctionUpdate` \$1 `Manual`  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)