Can an aws IAM policy dynamically refer to the logged in username?

后端 未结 1 1370
旧巷少年郎
旧巷少年郎 2021-01-21 07:40

I am trying to write an IAM policy which will control access to EC2 instances. All EC2 instances will have a custom tag called username and only if the tag value matches the log

相关标签:
1条回答
  • 2021-01-21 08:26

    The IAM user can be referred to in policy documents by ${aws:username}.

    There is a list of other IAM policy variables and their uses here:

    http://docs.aws.amazon.com/IAM/latest/UserGuide/PolicyVariables.html

    0 讨论(0)
提交回复
热议问题