2回答
- 新しい順
- 投票が多い順
- コメントが多い順
2
You can leverage Condition operator in IAM JSON policy elements Eg. Boolean conditions enable the creation of Condition elements that limit access by comparing a key to either "true" or "false."
{
"Sid": "DenyLaunchingPublicAMI",
"Effect": "Deny",
"Action": "ec2:RunInstances",
"Resource": "arn:aws:ec2:<region>::image/ami-*",
"Condition": {
"Bool": {
"ec2:Public": "true"
}
}
Document:
回答済み 8ヶ月前
1
You can also consult the following https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html#block-public-access-to-amis
回答済み 8ヶ月前
関連するコンテンツ
- 質問済み 6年前
- AWS公式更新しました 8ヶ月前