<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>🧑‍💻 Asignar rol de IAM a una instancia EC2 y probar acceso :: English</title><link>http://labs.rofriday.com/03_iam/5_assign_role/index.html</link><description>En este ejercicio vas a crear y asociar un rol de IAM a una instancia EC2, validando permisos diferenciados sobre buckets de S3.
Pasos del laboratorio Volvé a iniciar sesión como usuario administrador.
Crear buckets de S3:
Accedé a la consola de S3. Creá dos buckets: iam-test-&lt;tu_usuario> y iam-test-other-&lt;tu_usuario>. Subí un archivo a cada bucket. Crear el rol de IAM:
Desde la consola de IAM, seleccioná Roles > Create role. Elegí EC2 como entidad de confianza. En permisos, creá una política personalizada con el siguiente JSON (ajustá el nombre del bucket): { "Version": "2012-10-17", "Statement": [ { "Action": ["s3:ListAllMyBuckets", "s3:GetBucketLocation"], "Effect": "Allow", "Resource": ["arn:aws:s3:::*"] }, { "Effect": "Allow", "Action": [ "s3:Get*", "s3:List*" ], "Resource": [ "arn:aws:s3:::iam-test-&lt;tu_usuario>/*", "arn:aws:s3:::iam-test-&lt;tu_usuario>" ] } ] } Guardá la política como IAMBucketTestPolicy. Asociá la política al nuevo rol IAMBucketTestRole. Asociar el rol a la instancia EC2:</description><generator>Hugo</generator><language>en-US</language><atom:link href="http://labs.rofriday.com/03_iam/5_assign_role/index.xml" rel="self" type="application/rss+xml"/></channel></rss>