AWS Identity and Access Management
User Guide

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Actions, Resources, and Condition Keys for AWS Secrets Manager

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

References:

Actions Defined by AWS Secrets Manager

AWS Secrets Manager has no API operations that can be used in the Actions element of an IAM policy statement. To allow access to AWS Secrets Manager, specify “Action”: “secretsmanager:*” in your policy.

Resources Defined by AWS Secrets Manager

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
Secret arn:${Partition}:secretsmanager:${Region}:${Account}:secret:${SecretId}

aws:RequestTag/tag-key

aws:TagKeys

secretsmanager:ResourceTag/tag-key

secretsmanager:resource/AllowRotationLambdaArn

Condition Keys for AWS Secrets Manager

AWS Secrets Manager 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 in the IAM Policy Reference.

Condition Keys Description Type
aws:RequestTag/tag-key Filters access by a key that is present in the request the user makes to the Secrets Manager service. String
aws:TagKeys Filters access by the list of all the tag key namespresent in the request the user makes to the Secrets Manager service. String
secretsmanager:Description Filters access by the description text in the request. String
secretsmanager:ForceDeleteWithoutRecovery Filters access by whether the secret is to be deleted immediately without any recovery window. Boolean
secretsmanager:KmsKeyId Filters access by the ARN of the KMS key in the request. String
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. Long
secretsmanager:ResourceTag/tag-key Filters access by a tag key and value pair. String
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: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