An enterprise has migrated its identity management to an external SAML-based identity provider (IdP). The security team wants to implement a dynamic access control mechanism for developers who access AWS resources through federated roles. Developers should only be allowed to manage (start, stop, and terminate) Amazon EC2 instances that are tagged with a `Project` tag value matching their department's project assignment in the IdP. The solution must scale automatically without requiring IAM policy updates when new projects are created.
Which TWO actions should the solutions architect take to meet these requirements? (Select TWO.)
- Configure AWS IAM Identity Center to map the project attribute from the identity provider as a principal tag in the AWS federated session.Cevap
- Attach an IAM policy to the developers' permission set that allows EC2 actions only when the `aws:ResourceTag/Project` condition key matches the `aws:PrincipalTag/Project` key.Cevap
- CCreate individual IAM users for each developer, organize them into IAM groups named after each project, and attach inline policies to each group restricting access to specific EC2 instance IDs.
- DStore project tag mappings and developer usernames as plaintext in Systems Manager Parameter Store, and configure a cron job to update IAM group memberships accordingly.
- EUse the AWS account root user credentials to run a scheduled Lambda function that periodically checks if EC2 instances have the correct project tags and deletes non-compliant resources.
Cevap
Configure AWS IAM Identity Center to map the project attribute from the identity provider as a principal tag, and attach an IAM policy that allows EC2 actions only when the `aws:ResourceTag/Project` key matches the `aws:PrincipalTag/Project` key.
Mapping the project attribute to a principal tag via IAM Identity Center enables Attribute-Based Access Control (ABAC). When combined with an IAM policy that requires the instance's `Project` tag to match the user's principal tag, access is granted dynamically. This eliminates the need to update policies for new projects.
Adım Adım Çözüm
Anahtar Kavram
Attribute-Based Access Control (ABAC) and Identity Federation with IAM Identity Center
Tahmini Süre:2m 0s