Question

Difficulty: MediumIdentity and Access Management (IAM)

A startup is reviewing its AWS security configuration. Currently, all developers share a single IAM user with administrator privileges to manage resources, and an application running on Amazon EC2 instances uses hardcoded access keys to write data to an Amazon S3 bucket. Which of the following actions should the security team take to align with AWS security best practices? (Select TWO).

  1. Create individual IAM users for each developer and place them in an IAM group with the necessary administrative policies attached.Answer
  2. Attach an IAM role to the EC2 instances to grant the application temporary access to the S3 bucket instead of using hardcoded credentials.Answer
  3. C
    Configure the developers to use the AWS account root user for daily administrative tasks to avoid permission conflicts.
  4. D
    Create a single shared IAM role for all developers to log in to the AWS Management Console directly.
  5. E
    Submit a request to AWS Support to monitor and automatically rotate the hardcoded access keys within the application code.

Answer

Create individual IAM users for each developer and place them in an IAM group with the necessary administrative policies attached, and attach an IAM role to the EC2 instances to grant the application temporary access to the S3 bucket instead of using hardcoded credentials.
Creating individual IAM users and placing them in groups ensures that each developer has unique credentials and accountability for their actions. Attaching an IAM role to the EC2 instances allows the application to assume temporary credentials, which eliminates the security risk of storing long-term access keys inside the application code.

Step-by-Step Solution

1
Analyze the developer access setup and identify security risks.
The current setup uses a shared IAM user, which prevents individual accountability and violates identity management best practices.
Establishing individual IAM users grouped by job function is the recommended method to manage user identities and track actions.
2
Analyze the application access setup and identify security risks.
The application uses hardcoded access keys, which can be compromised if code is exposed.
AWS recommends using IAM roles to assign temporary credentials to applications running on AWS compute services like EC2.

Key Concept

AWS IAM Best Practices including individual users, groups, and temporary credentials via IAM roles.
Rate this question