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 Respostas
0
profile pictureAWS
ESPECIALISTA
David
respondido há 2 meses
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.

respondido há 2 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas