Create IAM Policy to restrict user

0

Hi, Please help me in creating IAM Policy and configure policy to user in which user should only be allowed to create specific type of instance in specific region.

regards, malik

已提问 2 个月前188 查看次数
2 回答
0
profile pictureAWS
专家
David
已回答 2 个月前
0

Below is an example policy document that allows the user to create only t2.micro instances in the us-east-1 region. You can adjust the instance types and region as needed.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "ec2:RunInstances",
            "Resource": "arn:aws:ec2:us-east-1::image/ami-*",
            "Condition": {
                "StringEquals": {
                    "ec2:InstanceType": "t2.micro",
                    "ec2:Region": "us-east-1"
                }
            }
        }
    ]
}

If necessary, you can modify the policy document to grant additional permissions or restrict further based on your specific requirements.

已回答 2 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则