AWS Code Sample
Catalog

asm-user-policy-grants-access-to-secret-with-specific-tag.json

This IAM policy demonstrates how to grant access to only those secrets that are tagged with the name 'ServerName' and the value 'ServerABC'.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "secretsmanager:DescribeSecret", "Resource": "*", "Condition": { "StringEquals": { "secretsmanager:ResourceTag/ServerName": "ServerABC" } } } ] }

Sample Details

Service: secretsmanager

Author: AWS

Type: full-example

On this page: