A financial services company is setting up a development AWS account. The company wants to allow the development team leads to create and manage IAM roles for their applications' Amazon EC2 instances. However, the security team must ensure that the team leads cannot create roles that grant access to sensitive S3 buckets, even though the team leads themselves have administrative permissions in the account. Which solution meets these security requirements with the least administrative overhead?
- ACreate individual IAM users with long-term security credentials for the applications, and manually attach the required permissions to each user while explicitly denying access to the sensitive S3 buckets.
- BStore a list of approved S3 buckets in Systems Manager Parameter Store as a plaintext parameter, and configure an AWS Lambda function triggered by AWS CloudTrail to delete newly created roles that violate these rules.
- Configure an IAM permissions boundary that defines the maximum allowed permissions, excluding access to the sensitive S3 buckets. Attach an IAM policy to the team leads that allows role creation only if this permissions boundary is applied to the new role.Answer
- DEnable KMS customer managed key automatic annual rotation, and configure the team leads to encrypt all new IAM roles with the rotated KMS key to automatically revoke S3 permissions for historical data.
Answer
Configure an IAM permissions boundary that defines the maximum allowed permissions, excluding access to the sensitive S3 buckets. Attach an IAM policy to the team leads that allows role creation only if this permissions boundary is applied to the new role.
The correct solution is to use an IAM permissions boundary. A permissions boundary is an advanced feature for using a managed policy to set the maximum permissions that an identity-based policy can grant to an IAM entity (user or role). When a permissions boundary is set on a role, the role can only perform actions that are allowed by both its identity-based policy and its permissions boundary. By requiring the team leads to specify this boundary when creating new roles (using the 'iam:PermissionsBoundary' condition key in their own IAM policy), the security team can safely delegate role creation without risking privilege escalation.
Step-by-Step Solution
Key Concept
IAM Permissions Boundary