CodeDeploy permissions reference
Use the following table when you are setting up access and writing permissions
policies that you can attach to an IAM identity (identity-based policies). The table
lists each CodeDeploy API operation, the actions for which you can grant permissions
to perform the action, and the format of the resource ARN to use for granting
permissions. You specify the actions in the policy's Action
field. You
specify an ARN, with or without a wildcard character (*), as the resource value in the
policy's Resource
field.
You can use AWS-wide condition keys in your CodeDeploy policies to express conditions. For a complete list of AWS-wide keys, see Available keys in the IAM User Guide.
To specify an action, use the codedeploy:
prefix followed by the API
operation name (for example, codedeploy:GetApplication
and
codedeploy:CreateApplication
). To specify multiple actions in a single
statement, separate them with commas (for example, "Action":
["codedeploy:action1", "codedeploy:action2"]
).
Using Wildcard Characters
You can use a wildcard character (*) in your ARN to specify multiple actions or
resources. For example, codedeploy:*
specifies all CodeDeploy actions
and codedeploy:Get*
specifies all CodeDeploy actions that begin with the
word Get
. The following example grants access to all deployment groups with
names that begin with West
and are associated with applications that have
names beginning with Test
.
arn:aws:codedeploy:us-west-2:444455556666:deploymentgroup:Test*/West*
You can use wildcards with the following resources listed in the table:
-
application-name
-
deployment-group-name
-
deployment-configuration-name
-
instance-ID
Wildcards can't be used with region
or
account-id
. For more information about wildcards, see
IAM identifiers in
IAM User Guide.
Note
In the ARN for each action, a colon (:) follows the resource. You can also follow the resource with a forward slash (/). For more information, see CodeDeploy example ARNs.
Use the scroll bars to see the rest of the table.
CodeDeploy API operations | Required permissions (API actions) | Resources |
---|---|---|
Required to add tags to one or more on-premises instances. |
arn:aws:codedeploy: |
|
Required to get information about multiple application revisions associated with the user. |
arn:aws:codedeploy: |
|
Required to get information about multiple applications associated with the user. |
arn:aws:codedeploy: |
|
BatchGetDeploymentGroups |
Required to get information about multiple deployment groups associated with the user. |
arn:aws:codedeploy: |
BatchGetDeploymentInstances | codedeploy:BatchGetDeploymentInstances Required to get information about one or more instance in a deployment group. |
arn:aws:codedeploy: |
Required to get information about multiple deployments associated with the user. |
arn:aws:codedeploy: |
|
Required to get information about one or more on-premises instances. |
arn:aws:codedeploy: |
|
Required during a blue/green deployment to start the process of registering instances in a replacement environment with an Elastic Load Balancing load balancer. |
arn:aws:codedeploy: |
|
Required to create an application associated with the user. |
arn:aws:codedeploy: |
|
Required to create a deployment for an application associated with the user. |
arn:aws:codedeploy: |
|
Required to create a custom deployment configuration associated with the user. |
arn:aws:codedeploy: |
|
Required to create a deployment group for an application associated with the user. |
arn:aws:codedeploy: |
|
Required to delete an application associated with the user. |
arn:aws:codedeploy: |
|
Required to delete a custom deployment configuration associated with the user. |
arn:aws:codedeploy: |
|
Required to delete a deployment group for an application associated with the user. |
arn:aws:codedeploy: |
|
Required to deregister an on-premises instance. |
arn:aws:codedeploy: |
|
Required to get information about a single application associated with the user. |
arn:aws:codedeploy: |
|
Required to get information about a single application revision for an application associated with the user. |
arn:aws:codedeploy: |
|
Required to get information about a single deployment to a deployment group for an application associated with the user. |
arn:aws:codedeploy: |
|
Required to get information about a single deployment configuration associated with the user. |
arn:aws:codedeploy: |
|
Required to get information about a single deployment group for an application associated with the user. |
arn:aws:codedeploy: |
|
Required to get information about a single instance in a deployment associated with the user. |
arn:aws:codedeploy: |
|
Required to get information about a target in a deployment associated with the user. |
arn:aws:codedeploy: |
|
Required to get information about a single on-premises instance. |
arn:aws:codedeploy: |
|
Required to get information about all application revisions for an application associated with the user. |
arn:aws:codedeploy: |
|
Required to get information about all applications associated with the user. |
arn:aws:codedeploy: |
|
Required to get information about all deployment configurations associated with the user. |
arn:aws:codedeploy: |
|
Required to get information about all deployment groups for an application associated with the user. |
arn:aws:codedeploy: |
|
Required to get information about all instances in a deployment associated with the user or AWS account. |
arn:aws:codedeploy: |
|
Required to get information about all deployments to a deployment group associated with the user, or to get all deployments associated with the user. |
arn:aws:codedeploy: |
|
Required to get information about all targets in a deployment associated with the user. |
arn:aws:codedeploy: |
|
Required to get a list of the names of stored connections to GitHub accounts. |
arn:aws:codedeploy: |
|
Required to get a list of one or more on-premises instance names. |
arn:aws:codedeploy: |
|
PutLifecycleEventHookExecutionStatus |
Required to provide notification of the status of the execution of a lifecycle hook event. |
arn:aws:codedeploy: |
Required to register information about an application revision for an application associated with the user. |
arn:aws:codedeploy: |
|
Required to register an on-premises instance with CodeDeploy. |
arn:aws:codedeploy: |
|
Required to remove tags from one or more on-premises instances. |
arn:aws:codedeploy: |
|
Required in a blue/green deployment to override a specified wait time and start terminating instances in the original environment immediately. |
arn:aws:codedeploy: |
|
Required to stop an in-progress deployment to a deployment group for an application associated with the user. |
arn:aws:codedeploy: |
|
Required to change information about an application associated with the user. |
arn:aws:codedeploy: |
|
Required to change information about a single deployment group for an application associated with the user. |
arn:aws:codedeploy: |
|
¹ When you specify ² Valid for ³ For |