

# Amazon CloudFormation resources generated when AWS::Serverless::CapacityProvider is specified
<a name="sam-specification-generated-resources-capacityprovider"></a>

When an `AWS::Serverless::CapacityProvider` is specified, Amazon Serverless Application Model (Amazon SAM) generates an `AWS::Lambda::CapacityProvider` base Amazon CloudFormation resource.

**`AWS::Lambda::CapacityProvider`**  
*`LogicalId`: *`<capacityprovider‑LogicalId>`  
*Referenceable property: *N/A (you must use the `LogicalId` to reference this Amazon CloudFormation resource)

In addition to this Amazon CloudFormation resource, when `AWS::Serverless::CapacityProvider` is specified, Amazon SAM also generates Amazon CloudFormation resources for the following scenarios:

**Topics**
+ [OperatorRole property is not specified](#sam-specification-generated-resources-capacityprovider-iam-role)

## OperatorRole property is not specified
<a name="sam-specification-generated-resources-capacityprovider-iam-role"></a>

When the `OperatorRole` property of an `AWS::Serverless::CapacityProvider` is *not* specified, Amazon SAM generates an `AWS::IAM::Role` Amazon CloudFormation resource with the `AWSLambdaManagedEC2ResourceOperator` managed policy attached.

**`AWS::IAM::Role`**  
*`LogicalId`: *`<capacityprovider‑LogicalId>OperatorRole`  
*Referenceable property: *N/A (you must use the `LogicalId` to reference this Amazon CloudFormation resource)