View a markdown version of this page

Actions, resources, and condition keys for Amazon Secrets Manager - Service Authorization Reference
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Actions, resources, and condition keys for Amazon Secrets Manager

Amazon Secrets Manager (service prefix: secretsmanager) provides the following service-specific operations, resources, actions, and condition keys for use in IAM permission policies.

References:

API operations defined by Amazon Secrets Manager

The following table maps API operations to the IAM actions they authorize. Only condition keys that have static values for the given API and action are listed; for the full set of condition keys supported by each action, see the Actions table.

Operation IAM action Condition key Possible value(s) Access level

BatchGetSecretValue

secretsmanager:BatchGetSecretValue

Read

secretsmanager:GetSecretValue

Read

secretsmanager:ListSecrets

List

CancelRotateSecret

secretsmanager:CancelRotateSecret

Write

CreateSecret

secretsmanager:CreateSecret

Write

secretsmanager:ReplicateSecretToRegions

Write

secretsmanager:TagResource

Tagging, Write

DeleteResourcePolicy

secretsmanager:DeleteResourcePolicy

Permissions management, Write

DeleteSecret

secretsmanager:DeleteSecret

Write

DescribeSecret

secretsmanager:DescribeSecret

Read

GetRandomPassword

secretsmanager:GetRandomPassword

Read

GetResourcePolicy

secretsmanager:GetResourcePolicy

Read

GetSecretValue

secretsmanager:GetSecretValue

Read

ListSecretVersionIds

secretsmanager:ListSecretVersionIds

Read

ListSecrets

secretsmanager:ListSecrets

List

PutResourcePolicy

secretsmanager:PutResourcePolicy

Permissions management, Write

PutSecretValue

secretsmanager:PutSecretValue

Write

RemoveRegionsFromReplication

secretsmanager:RemoveRegionsFromReplication

Write

ReplicateSecretToRegions

secretsmanager:ReplicateSecretToRegions

Write

RestoreSecret

secretsmanager:RestoreSecret

Write

RotateSecret

secretsmanager:RotateSecret

Write

iam:PassRole

iam:PassedToService

secretsmanager.amazonaws.com

Write

StopReplicationToReplica

secretsmanager:StopReplicationToReplica

Write

TagResource

secretsmanager:TagResource

Tagging, Write

UntagResource

secretsmanager:UntagResource

Tagging, Write

UpdateSecret

secretsmanager:UpdateSecret

Write

UpdateSecretVersionStage

secretsmanager:UpdateSecretVersionStage

Write

ValidateResourcePolicy

secretsmanager:PutResourcePolicy

Permissions management, Write

secretsmanager:ValidateResourcePolicy

Permissions management, Write

Actions defined by Amazon Secrets Manager

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 Amazon. 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.

Actions Description Resource types (*required) Condition keys Access level

BatchGetSecretValue

Grants permission to retrieve and decrypt a list of secrets

Read

CancelRotateSecret

Grants permission to cancel an in-progress secret rotation

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Write

CreateSecret

Grants permission to create a secret that stores encrypted data that can be queried and rotated

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:AddReplicaRegions

secretsmanager:Description

secretsmanager:ForceOverwriteReplicaSecret

secretsmanager:KmsKeyArn

secretsmanager:KmsKeyId

secretsmanager:Name

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:Type

Write

DeleteResourcePolicy

Grants permission to delete the resource policy attached to a secret

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Permissions management, Write

DeleteSecret

Grants permission to delete a secret

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:ForceDeleteWithoutRecovery

secretsmanager:RecoveryWindowInDays

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Write

DescribeSecret

Grants permission to retrieve the metadata about a secret, but not the encrypted data

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Read

GetRandomPassword

Grants permission to generate a random string for use in password creation

Read

GetResourcePolicy

Grants permission to get the resource policy attached to a secret

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Read

GetSecretValue

Grants permission to retrieve and decrypt the encrypted data

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

secretsmanager:VersionId

secretsmanager:VersionStage

Read

ListSecretVersionIds

Grants permission to list the available versions of a secret

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Read

ListSecrets

Grants permission to list the available secrets

List

PutResourcePolicy

Grants permission to attach a resource policy to a secret

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:BlockPublicPolicy

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Permissions management, Write

PutSecretValue

Grants permission to create a new version of the secret with new encrypted data

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Write

RemoveRegionsFromReplication

Grants permission to remove regions from replication

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Write

ReplicateSecretToRegions

Grants permission to convert an existing secret to a multi-Region secret and begin replicating the secret to a list of new regions

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:AddReplicaRegions

secretsmanager:ForceOverwriteReplicaSecret

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Write

RestoreSecret

Grants permission to cancel deletion of a secret

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Write

RotateSecret

Grants permission to start rotation of a secret

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:ExternalSecretRotationRoleArn

secretsmanager:ModifyRotationRules

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:RotateImmediately

secretsmanager:RotationLambdaARN

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Write

StopReplicationToReplica

Grants permission to remove the secret from replication and promote the secret to a regional secret in the replica Region

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Write

TagResource

Grants permission to add tags to a secret

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Tagging, Write

UntagResource

Grants permission to remove tags from a secret

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Tagging, Write

UpdateSecret

Grants permission to update a secret with new metadata or with a new version of the encrypted data

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:Description

secretsmanager:KmsKeyArn

secretsmanager:KmsKeyId

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

secretsmanager:Type

Write

UpdateSecretVersionStage

Grants permission to move a stage from one secret to another

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

secretsmanager:VersionStage

Write

ValidateResourcePolicy

Grants permission to validate a resource policy before attaching policy

Secret*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

secretsmanager:resource/AllowRotationLambdaArn

secretsmanager:resource/Type

secretsmanager:ResourceTag/tag-key

secretsmanager:SecretId

secretsmanager:SecretPrimaryRegion

Permissions management, Write

Resource types defined by Amazon Secrets Manager

The following resource types are defined by this service and can be used in the Resource element of IAM permission policy statements.

Condition keys for Amazon Secrets Manager

Amazon Secrets Manager defines the following condition keys that can be used in the Condition element of an IAM policy.

Condition keys Description Type

aws:RequestTag/${TagKey}

Filters access by a key that is present in the request the user makes to the Secrets Manager service

String

aws:ResourceTag/${TagKey}

Filters access by the tags associated with the resource

String

aws:TagKeys

Filters access by the list of all the tag key names present in the request the user makes to the Secrets Manager service

ArrayOfString

secretsmanager:AddReplicaRegions

Filters access by the list of Regions in which to replicate the secret

ArrayOfString

secretsmanager:BlockPublicPolicy

Filters access by whether the resource policy blocks broad Amazon Web Services account access

Bool

secretsmanager:Description

Filters access by the description text in the request

String

secretsmanager:ExternalSecretRotationRoleArn

Filters access by the managed external secret rotation role ARN in the request

ARN

secretsmanager:ForceDeleteWithoutRecovery

Filters access by whether the secret is to be deleted immediately without any recovery window

Bool

secretsmanager:ForceOverwriteReplicaSecret

Filters access by whether to overwrite a secret with the same name in the destination Region

Bool

secretsmanager:KmsKeyArn

Filters access by the key ARN of the KMS key in the request

ARN

secretsmanager:KmsKeyId

Filters access by the key identifier of the KMS key in the request. Deprecated: Use secretsmanager:KmsKeyArn

String

secretsmanager:ModifyRotationRules

Filters access by whether the rotation rules of the secret are to be modified

Bool

secretsmanager:Name

Filters access by the friendly name of the secret in the request

String

secretsmanager:RecoveryWindowInDays

Filters access by the number of days that Secrets Manager waits before it can delete the secret

Numeric

secretsmanager:ResourceTag/tag-key

Filters access by a tag key and value pair

String

secretsmanager:RotateImmediately

Filters access by whether the secret is to be rotated immediately

Bool

secretsmanager:RotationLambdaARN

Filters access by the ARN of the rotation Lambda function in the request

ARN

secretsmanager:SecretId

Filters access by the SecretID value in the request

ARN

secretsmanager:SecretPrimaryRegion

Filters access by primary region in which the secret is created if the secret is a multi-Region secret

String

secretsmanager:Type

Filters access by the managed external secret type in the request

String

secretsmanager:VersionId

Filters access by the unique identifier of the version of the secret in the request

String

secretsmanager:VersionStage

Filters access by the list of version stages in the request

String

secretsmanager:resource/AllowRotationLambdaArn

Filters access by the ARN of the rotation Lambda function associated with the secret

ARN

secretsmanager:resource/Type

Filters access by the managed external secret type associated with the secret

String