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
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 of the Actions table indicates whether each action supports resource-level permissions. If there is no value for this column, you must specify all resources ("*") to which the policy applies 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. If the action has one or more required resources, the caller must have permission to use the action with those resources. Required resources are indicated in the table with an asterisk (*). If you limit resource access with the Resource
element in an IAM policy, you must include an ARN or pattern for each required resource type. Some actions support multiple resource types. If the resource type is optional (not indicated as required), then you can choose to use one of the optional resource types.
The Condition keys column of the Actions table includes keys that you can specify in a policy statement's Condition
element. For more information on the condition keys that are associated with resources for the service, see the Condition keys column of the Resource types table.
Note
Resource condition keys are listed in the Resource types table. You can find a link to the resource type that applies to an action in the Resource types (*required) column of the Actions table. The resource type in the Resource types table includes the Condition keys column, which are the resource condition keys that apply to an action in the Actions table.
For details about the columns in the following table, see Actions table.
Actions | Description | Access level | Resource types (*required) | Condition keys | Dependent actions |
---|---|---|---|---|---|
ActivateOrganizationsAccess | Grants permission to activate trusted access between StackSets and Organizations. With trusted access between StackSets and Organizations activated, the management account has permissions to create and manage StackSets for your organization | Write | |||
ActivateType | Grants permission to activate a public third-party extension, making it available for use in stack templates | Write | |||
BatchDescribeTypeConfigurations | Grants permission to return configuration data for the specified CloudFormation extensions | Read | |||
CancelUpdateStack | Grants permission to cancel an update on the specified stack | Write | |||
ContinueUpdateRollback | Grants permission to continue rolling back a stack that is in the UPDATE_ROLLBACK_FAILED state to the UPDATE_ROLLBACK_COMPLETE state | Write | |||
CreateChangeSet | Grants permission to create a list of changes for a stack | Write | |||
CreateGeneratedTemplate | Grants permission to create a template from existing resources that are not already managed with CloudFormation | Write | |||
CreateStack | Grants permission to create a stack as specified in the template | Write | |||
CreateStackInstances | Grants permission to create stack instances for the specified accounts, within the specified regions | Write | |||
CreateStackSet | Grants permission to create a stackset as specified in the template | Write | |||
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 | |||
DeactivateOrganizationsAccess | Grants permission to deactivate trusted access between StackSets and Organizations. If trusted access is deactivated, the management account does not have permissions to create and manage service-managed StackSets for your organization | Write | |||
DeactivateType | Grants permission to deactivate a public extension that was previously activated in this account and region | Write | |||
DeleteChangeSet | Grants permission to delete the specified change set. Deleting change sets ensures that no one executes the wrong change set | Write | |||
DeleteGeneratedTemplate | Grants permission to delete a generated template | Write | |||
DeleteStack | Grants permission to delete a specified stack | Write | |||
DeleteStackInstances | Grants permission to delete stack instances for the specified accounts, in the specified regions | Write | |||
DeleteStackSet | Grants permission to delete a specified stackset | Write | |||
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 | |||
DescribeChangeSetHooks | Grants permission to return the Hook invocation information for the specified change set | Read | |||
DescribeGeneratedTemplate | Grants permission to describe a generated template. The output includes details about the progress of the creation of a generated template | Read | |||
DescribeOrganizationsAccess | Grants permission to return information about the account's OrganizationAccess status | Read | |||
DescribePublisher | Grants permission to return information about a CloudFormation extension publisher | Read | |||
DescribeResourceScan | Grants permission to describe details of a resource scan | Read | |||
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 | |||
DescribeStackInstance | Grants permission to return the stack instance that's associated with the specified stack set, AWS account, and region | Read | |||
DescribeStackResource | Grants permission to return a description of the specified resource in the specified stack | Read | |||
DescribeStackResourceDrifts | Grants permission to return drift information for the resources that have been checked for drift in the specified stack | Read | |||
DescribeStackResources | Grants permission to return AWS resource descriptions for running and deleted stacks | Read | |||
DescribeStackSet | Grants permission to return the description of the specified stack set | Read | |||
DescribeStackSetOperation | Grants permission to return the description of the specified stack set operation | Read | |||
DescribeStacks | Grants permission to return the description for the specified stack, and to all stacks when used in combination with the ListStacks action | List |
cloudformation:ListStacks |
||
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 | |||
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 | |||
DetectStackSetDrift | Grants permission to enable users to detect drift on a stack set and the stack instances that belong to that stack set | Read | |||
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 | |||
GetGeneratedTemplate | Grants permission to retrieve a generated template | Read | |||
GetStackPolicy | Grants permission to return the stack policy for a specified stack | Read | |||
GetTemplate | Grants permission to return the template body for a specified stack | Read | |||
GetTemplateSummary | Grants permission to return information about a new or existing template | Read | |||
ImportStacksToStackSet | Grants permission to enable users to import existing stacks to a new or existing stackset | Write | |||
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 | |||
ListExports | Grants permission to list all exported output values in the account and region in which you call this action | List | |||
ListGeneratedTemplates | Grants permission to list your generated templates in this Region | List | |||
ListImports | Grants permission to list all stacks that are importing an exported output value | List | |||
ListResourceScanRelatedResources | Grants permission to list the related resources for a list of resources from a resource scan. The response indicates whether each returned resource is already managed by CloudFormation | List | |||
ListResourceScanResources | Grants permission to list the resources from a resource scan. The results can be filtered by resource identifier, resource type prefix, tag key, and tag value | List | |||
ListResourceScans | Grants permission to list the resource scans from newest to oldest. By default it will return up to 10 resource scans | List | |||
ListStackInstanceResourceDrifts | Grants permission to return drift information for the resources that have been checked for drift in the specified stack instance | List | |||
ListStackInstances | Grants permission to return summary information about stack instances that are associated with the specified stack set | List | |||
ListStackResources | Grants permission to return descriptions of all resources of the specified stack | List | |||
ListStackSetAutoDeploymentTargets | Grants permission to return summary information about StackSet Auto Deployment Targets | List | |||
ListStackSetOperationResults | Grants permission to return summary information about the results of a stack set operation | List | |||
ListStackSetOperations | Grants permission to return summary information about operations performed on a stack set | List | |||
ListStackSets | Grants permission to return summary information about stack sets that are associated with the user | List | |||
ListStacks | Grants permission to return the summary information for stacks whose status matches the specified StackStatusFilter. In combination with the DescribeStacks action, grants permission to list descriptions for stacks | 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 | |||
PublishType | Grants permission to publish the specified extension to the CloudFormation registry as a public extension in this region | Write | |||
RecordHandlerProgress | Grants permission to record the handler progress | Write | |||
RegisterPublisher | Grants permission to register account as a publisher of public extensions in the CloudFormation registry | Write | |||
RegisterType | Grants permission to register a new CloudFormation type | Write | |||
RollbackStack | Grants permission to rollback the stack to the last stable state | Write | |||
SetStackPolicy | Grants permission to set a stack policy for a specified stack | Permissions management | |||
SetTypeConfiguration | Grants permission to set the configuration data for a registered CloudFormation extension, in the given account and region | Write | |||
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 | |||
StartResourceScan | Grants permission to start a scan of the resources in this account in this Region | Write | |||
StopStackSetOperation | Grants permission to stop an in-progress operation on a stack set and its associated stack instances | Write | |||
TagResource | Grants permission to tag cloudformation resources | Tagging | |||
TestType | Grants permission to test a registered extension to make sure it meets all necessary requirements for being published in the CloudFormation registry | Write | |||
UntagResource | Grants permission to untag cloudformation resources | Tagging | |||
UpdateGeneratedTemplate | Grants permission to update a generated template. This can be used to change the name, add and remove resources, refresh resources, and change the DeletionPolicy and UpdateReplacePolicy settings | Write | |||
UpdateStack | Grants permission to update a stack as specified in the template | Write | |||
UpdateStackInstances | Grants permission to update the parameter values for stack instances for the specified accounts, within the specified regions | Write | |||
UpdateStackSet | Grants permission to update a stackset as specified in the template | Write | |||
UpdateTerminationProtection | Grants permission to update termination protection for the specified stack | Write | |||
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 Resource types table. For details about the columns in the following table, see 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}
|
|
stackset |
arn:${Partition}:cloudformation:${Region}:${Account}:stackset/${StackSetName}:${Id}
|
|
stackset-target |
arn:${Partition}:cloudformation:${Region}:${Account}:stackset-target/${StackSetTarget}
|
|
type |
arn:${Partition}:cloudformation:${Region}:${Account}:type/resource/${Type}
|
|
generatedtemplate |
arn:${Partition}:cloudformation:${Region}:${Account}:generatedTemplate/${Id}
|
|
resourcescan |
arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}
|
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 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 access by the tags that are passed in the request | String |
aws:ResourceTag/${TagKey} | Filters access by the tags associated with the resource | String |
aws:TagKeys | Filters access by the tag keys that are passed in the request | ArrayOfString |
cloudformation:ChangeSetName | Filters access by an AWS CloudFormation change set name. Use to control which change sets IAM users can execute or delete | String |
cloudformation:ImportResourceTypes | Filters access by 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 access by 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 | ArrayOfString |
cloudformation:RoleArn | Filters access by 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 access by 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:TargetRegion | Filters access by stack set target region. Use to control which regions IAM users can use when they create or update stack sets | ArrayOfString |
cloudformation:TemplateUrl | Filters access by an Amazon S3 template URL. Use to control which templates IAM users can use when they create or update stacks | String |