How to create the AWS iam policy for hide the ec2 instance based on tags

0

I'm looking for a way to restrict the visibility ec2 instances to certain IAM accounts. I'd really like a way for a particular account to only be able to see the instances that it has created i.e. when it does a describeInstances only those it has created are present.

KARTHIK
preguntada hace 9 meses409 visualizaciones
3 Respuestas
2

I think what you're asking is how to restrict visibility of EC2 instances in a specific account where there are multiple users in that account. The short answer is that you can't do that - you can restrict (using tag policies) what actions different users (i.e. callers to the EC2 API with different identities) can perform on EC2 instances; but you can't restrict the visibility of those instances in a "List" operation - either via the API or in the console.

Not really answering the question but for more information about tag-based access control: https://repost.aws/knowledge-center/restrict-ec2-iam

profile pictureAWS
EXPERTO
respondido hace 9 meses
profile pictureAWS
EXPERTO
revisado hace 9 meses
0
Respuesta aceptada

Why we can't hide the particular instance for that particular user???

KARTHIK
respondido hace 9 meses
  • See the comment on the other answer - the API doesn't support resource-level permissions. This is because the API is designed as a "list all the resources" rather than "list the specified resources".

0

You can leverage AWS Organizations and give each group their own AWS account.

AWS
respondido hace 9 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas