Skip to content

Instantly share code, notes, and snippets.

@niski84
Created December 8, 2022 19:12
Show Gist options
  • Save niski84/3c4f73211b61a8c78bf416da99766bd4 to your computer and use it in GitHub Desktop.
Save niski84/3c4f73211b61a8c78bf416da99766bd4 to your computer and use it in GitHub Desktop.
AllowAccessToOnlyFewSecrets
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAccessToGogAndGogCloneSecrets",
"Effect": "Allow",
"Action": [
"secretsmanager:GetSecretValue"
],
"Resource": [
"arn:aws:secretsmanager:us-east-1:123456789012:secret:/gog/*",
"arn:aws:secretsmanager:us-east-1:123456789012:secret:/gog-clone/*"
]
},
{
"Sid": "DenyAccessToOtherSecrets",
"Effect": "Deny",
"Action": [
"secretsmanager:GetSecretValue"
],
"Resource": [
"arn:aws:secretsmanager:us-east-1:123456789012:secret:*"
],
"Condition": {
"StringNotLike": {
"secretsmanager:Name": [
"/gog/*",
"/gog-clone/*"
]
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment