Actions, resources, and condition keys for AWS CloudFormation - Service Authorization Reference

# Actions, resources, and condition keys for AWS CloudFormation

AWS CloudFormation (service prefix: `cloudformation` ) provides the following service-specific resources, actions, and condition context keys for use in IAM permission policies.

References:

- Learn how to configure this service .

- View a list of the API operations available for this service .

- Learn how to secure this service and its resources by using IAM permission policies.

Topics

- Actions defined by AWS CloudFormation
- Resource types defined by AWS CloudFormation
- Condition keys for AWS CloudFormation

## Actions defined by AWS CloudFormation

You can specify the following actions in the `Action` element of an IAM policy statement. Use policies to grant permissions to perform an operation in AWS. When you use an action in a policy, you usually allow or deny access to the API operation or CLI command with the same name. However, in some cases, a single action controls access to more than one operation. Alternatively, some operations require several different actions.

The Resource types column indicates whether each action supports resource-level permissions. If there is no value for this column, you must specify all resources ("*") in the `Resource` element of your policy statement. If the column includes a resource type, then you can specify an ARN of that type in a statement with that action. Required resources are indicated in the table with an asterisk (*). If you specify a resource-level permission ARN in a statement using this action, then it must be of this type. Some actions support multiple resource types. If the resource type is optional (not indicated as required), then you can choose to use one but not the other.

For details about the columns in the following table, see The actions table .

Actions | Description | Access level | Resource types (*required) | Condition keys | Dependent actions
--- | --- | --- | --- | --- | ---
CancelUpdateStack | Grants permission to cancel an update on the specified stack | Write | stack* |  |
ContinueUpdateRollback | Grants permission to continue rolling back a stack that is in the UPDATE_ROLLBACK_FAILED state to the UPDATE_ROLLBACK_COMPLETE state | Write | stack* |  |
| cloudformation:RoleArn |
CreateChangeSet | Grants permission to create a list of changes for a stack | Write | stack* |  |
| cloudformation:ChangeSetName cloudformation:ResourceTypes cloudformation:ImportResourceTypes cloudformation:RoleArn cloudformation:StackPolicyUrl cloudformation:TemplateUrl aws:RequestTag/${TagKey} aws:TagKeys |
CreateStack | Grants permission to create a stack as specified in the template | Write | stack* |  |
| cloudformation:ResourceTypes cloudformation:RoleArn cloudformation:StackPolicyUrl cloudformation:TemplateUrl aws:RequestTag/${TagKey} aws:TagKeys |
CreateStackInstances | Grants permission to create stack instances for the specified accounts, within the specified regions | Write | stackset* |  |
stackset-target |  |
type |  |
CreateStackSet | Grants permission to create a stackset as specified in the template | Write |  | cloudformation:RoleArn cloudformation:TemplateUrl aws:RequestTag/${TagKey} aws:TagKeys |
CreateUploadBucket [permission only] | Grants permission to upload templates to Amazon S3 buckets. Used only by the AWS CloudFormation console and is not documented in the API reference | Write |  |  |
DeleteChangeSet | Grants permission to delete the specified change set. Deleting change sets ensures that no one executes the wrong change set | Write | stack* |  |
| cloudformation:ChangeSetName |
DeleteStack | Grants permission to delete a specified stack | Write | stack* |  |
| cloudformation:RoleArn |
DeleteStackInstances | Grants permission to delete stack instances for the specified accounts, in the specified regions | Write | stackset* |  |
stackset-target |  |
type |  |
DeleteStackSet | Grants permission to delete a specified stackset | Write | stackset* |  |
DeregisterType | Grants permission to deregister an existing CloudFormation type or type version | Write |  |  |
DescribeAccountLimits | Grants permission to retrieve your account's AWS CloudFormation limits | Read |  |  |
DescribeChangeSet | Grants permission to return the description for the specified change set | Read | stack* |  |
| cloudformation:ChangeSetName |
DescribeStackDriftDetectionStatus | Grants permission to return information about a stack drift detection operation | Read |  |  |
DescribeStackEvents | Grants permission to return all stack related events for a specified stack | Read | stack* |  |
DescribeStackInstance | Grants permission to return the stack instance that's associated with the specified stack set, AWS account, and region | Read | stackset* |  |
DescribeStackResource | Grants permission to return a description of the specified resource in the specified stack | Read | stack* |  |
DescribeStackResourceDrifts | Grants permission to return drift information for the resources that have been checked for drift in the specified stack | Read | stack* |  |
DescribeStackResources | Grants permission to return AWS resource descriptions for running and deleted stacks | Read | stack* |  |
DescribeStackSet | Grants permission to return the description of the specified stack set | Read | stackset* |  |
DescribeStackSetOperation | Grants permission to return the description of the specified stack set operation | Read | stackset* |  |
DescribeStacks | Grants permission to return the description for the specified stack | List | stack* |  |
DescribeType | Grants permission to return information about the CloudFormation type requested | Read |  |  |
DescribeTypeRegistration | Grants permission to return information about the registration process for a CloudFormation type | Read |  |  |
DetectStackDrift | Grants permission to detects whether a stack's actual configuration differs, or has drifted, from it's expected configuration, as defined in the stack template and any values specified as template parameters | Read | stack* |  |
DetectStackResourceDrift | Grants permission to return information about whether a resource's actual configuration differs, or has drifted, from it's expected configuration, as defined in the stack template and any values specified as template parameters | Read | stack* |  |
DetectStackSetDrift | Grants permission to enable users to detect drift on a stack set and the stack instances that belong to that stack set | Read | stackset* |  |
EstimateTemplateCost | Grants permission to return the estimated monthly cost of a template | Read |  |  |
ExecuteChangeSet | Grants permission to update a stack using the input information that was provided when the specified change set was created | Write | stack* |  |
| cloudformation:ChangeSetName |
GetStackPolicy | Grants permission to return the stack policy for a specified stack | Read | stack* |  |
GetTemplate | Grants permission to return the template body for a specified stack | Read | stack* |  |
GetTemplateSummary | Grants permission to return information about a new or existing template | Read | stack |  |
stackset |  |
ListChangeSets | Grants permission to return the ID and status of each active change set for a stack. For example, AWS CloudFormation lists change sets that are in the CREATE_IN_PROGRESS or CREATE_PENDING state | List | stack* |  |
ListExports | Grants permission to list all exported output values in the account and region in which you call this action | List |  |  |
ListImports | Grants permission to list all stacks that are importing an exported output value | List |  |  |
ListStackInstances | Grants permission to return summary information about stack instances that are associated with the specified stack set | List | stackset* |  |
ListStackResources | Grants permission to return descriptions of all resources of the specified stack | List | stack* |  |
ListStackSetOperationResults | Grants permission to return summary information about the results of a stack set operation | List | stackset* |  |
ListStackSetOperations | Grants permission to return summary information about operations performed on a stack set | List | stackset* |  |
ListStackSets | Grants permission to return summary information about stack sets that are associated with the user | List | stackset* |  |
ListStacks | Grants permission to return the summary information for stacks whose status matches the specified StackStatusFilter | List |  |  |
ListTypeRegistrations | Grants permission to list CloudFormation type registration attempts | List |  |  |
ListTypeVersions | Grants permission to list versions of a particular CloudFormation type | List |  |  |
ListTypes | Grants permission to list available CloudFormation types | List |  |  |
RecordHandlerProgress | Grants permission to record the handler progress | Write | stack* |  |
RegisterType | Grants permission to register a new CloudFormation type | Write |  |  |
SetStackPolicy | Grants permission to set a stack policy for a specified stack | Permissions management | stack* |  |
| cloudformation:StackPolicyUrl |
SetTypeDefaultVersion | Grants permission to set which version of a CloudFormation type applies to CloudFormation operations | Write |  |  |
SignalResource | Grants permission to send a signal to the specified resource with a success or failure status | Write | stack* |  |
StopStackSetOperation | Grants permission to stop an in-progress operation on a stack set and its associated stack instances | Write | stackset* |  |
TagResource | Grants permission to tag cloudformation resources | Tagging | stack |  |
stackset |  |
UntagResource | Grants permission to untag cloudformation resources | Tagging | stack |  |
stackset |  |
UpdateStack | Grants permission to update a stack as specified in the template | Write | stack* |  |
| cloudformation:ResourceTypes cloudformation:RoleArn cloudformation:StackPolicyUrl cloudformation:TemplateUrl aws:RequestTag/${TagKey} aws:TagKeys |
UpdateStackInstances | Grants permission to update the parameter values for stack instances for the specified accounts, within the specified regions | Write | stackset* |  |
stackset-target |  |
type |  |
UpdateStackSet | Grants permission to update a stackset as specified in the template | Write | stackset* |  |
stackset-target |  |
type |  |
| cloudformation:RoleArn cloudformation:TemplateUrl aws:RequestTag/${TagKey} aws:TagKeys |
UpdateTerminationProtection | Grants permission to update termination protection for the specified stack | Write | stack* |  |
ValidateTemplate | Grants permission to validate a specified template | Read |  |  |

## Resource types defined by AWS CloudFormation

The following resource types are defined by this service and can be used in the `Resource` element of IAM permission policy statements. Each action in the Actions table identifies the resource types that can be specified with that action. A resource type can also define which condition keys you can include in a policy. These keys are displayed in the last column of the table. For details about the columns in the following table, see The resource types table .

Resource types | ARN | Condition keys
--- | --- | ---
changeset | `arn:$ { Partition}:cloudformation:$ { Region}:$ { Account}:changeSet/$ { ChangeSetName}/$ { Id}` |
stack | `arn:$ { Partition}:cloudformation:$ { Region}:$ { Account}:stack/$ { StackName}/$ { Id}` | aws:ResourceTag/${TagKey}
stackset | `arn:$ { Partition}:cloudformation:$ { Region}:$ { Account}:stackset/$ { StackSetName}/$ { Id}` | aws:ResourceTag/${TagKey}
stackset-target | `arn:$ { Partition}:cloudformation:$ { Region}:$ { Account}:stackset-target/$ { StackSetTarget}` |
type | `arn:$ { Partition}:cloudformation:$ { Region}:$ { Account}:type/resource/$ { Type}` |

## Condition keys for AWS CloudFormation

AWS CloudFormation defines the following condition keys that can be used in the `Condition` element of an IAM policy. You can use these keys to further refine the conditions under which the policy statement applies. For details about the columns in the following table, see The condition keys table .

To view the global condition keys that are available to all services, see Available global condition keys .

Condition keys | Description | Type
--- | --- | ---
aws:RequestTag/${TagKey} | Filters actions based on the tags that are passed in the request | String
aws:ResourceTag/${TagKey} | Filters actions based on the tags associated with the resource | String
aws:TagKeys | Filters actions based on the tag keys that are passed in the request | String
cloudformation:ChangeSetName | Filters actions based on an AWS CloudFormation change set name. Use to control which change sets IAM users can execute or delete | String
cloudformation:ImportResourceTypes | Filters actions based on the template resource types, such as AWS::EC2::Instance. Use to control which resource types IAM users can work with when they want to import a resource into a stack | String
cloudformation:ResourceTypes | Filters actions based on the template resource types, such as AWS::EC2::Instance. Use to control which resource types IAM users can work with when they create or update a stack | String
cloudformation:RoleArn | Filters actions based on the ARN of an IAM service role. Use to control which service role IAM users can use to work with stacks or change sets | ARN
cloudformation:StackPolicyUrl | Filters actions based on an Amazon S3 stack policy URL. Use to control which stack policies IAM users can associate with a stack during a create or update stack action | String
cloudformation:TemplateUrl | Filters actions based on an Amazon S3 template URL. Use to control which templates IAM users can use when they create or update stacks | String

Did this page help you? - Yes

Thanks for letting us know we're doing a good job!

If you've got a moment, please tell us what we did right so we can do more of it.

Did this page help you? - No

Thanks for letting us know this page needs work. We're sorry we let you down.

If you've got a moment, please tell us how we can make the documentation better.