I'm trying to make an AWS Secrets Manager resource to be accesed only by certain user by writing a resource policy for the Secrets Manager but I can't make it work, I have tried a policy with Allow
and Deny
with Principal
and NotPrincipal
, a Deny
policy with NotPrincipal
and Condition
, NotArnLike
with aws:SourceArn
. All this configs with the arn of the user arn:aws:iam::123456789012:user/fbuccioni
.
My scenario is kinda root account, 2 devops with user/policy privileges to 3rd parties and need only the root account access to the secretsmanager:GetValue
action. That's why I'm trying to securize the resource instead doing separate IAM identity based policies.
How can I make it work?
Is there a default Deny
policy and I have to Allow
? in the aws examples have an allow condition only.