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回答
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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ