ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 877 - SAA-C03 discussion

Report
Export

A company is designing a microservice-based architecture tor a new application on AWS. Each microservice will run on its own set of Amazon EC2 instances. Each microservice will need to interact with multiple AWS services such as Amazon S3 and Amazon Simple Queue Service (Amazon SQS).

The company wants to manage permissions for each EC2 instance based on the principle of least privilege.

Which solution will meet this requirement?

A.

Assign an 1AM user to each micro-service. Use access keys stored within the application code to authenticate AWS service requests.

Answers
A.

Assign an 1AM user to each micro-service. Use access keys stored within the application code to authenticate AWS service requests.

B.

Create a single 1AM role that has permission to access all AWS services. Associate the 1AM role with all EC2 instances that run the microservices

Answers
B.

Create a single 1AM role that has permission to access all AWS services. Associate the 1AM role with all EC2 instances that run the microservices

C.

Use AWS Organizations to create a separate account for each microservice. Manage permissions at the account level.

Answers
C.

Use AWS Organizations to create a separate account for each microservice. Manage permissions at the account level.

D.

Create individual 1AM roles based on the specific needs of each microservice. Associate the 1AM roles with the appropriate EC2 instances.

Answers
D.

Create individual 1AM roles based on the specific needs of each microservice. Associate the 1AM roles with the appropriate EC2 instances.

Suggested answer: D

Explanation:

When designing a microservice architecture where each microservice interacts with different AWS services, it's essential to follow the principle of least privilege. This means granting each microservice only the permissions it needs to perform its tasks, reducing the risk of unauthorized access or accidental actions.

The recommended approach is to create individual IAM roles with policies that grant each microservice the specific permissions it requires. Then, these roles should be associated with the EC2 instances that run the corresponding microservice. By doing so, each EC2 instance will assume its specific IAM role, and permissions will be automatically managed by AWS.

IAM roles provide temporary credentials via the instance metadata service, eliminating the need to hard-code credentials in your application code, which enhances security.

AWS

Reference:

IAM Roles for Amazon EC2 explains how EC2 instances can use IAM roles to securely access AWS services without managing long-term credentials.

Best Practices for IAM includes recommendations for implementing the least privilege principle and using IAM roles effectively.

Why the other options are incorrect:

A . Assign an IAM user to each microservice: This requires managing long-term credentials (access keys), which should be avoided. Storing keys in application code is insecure and creates a maintenance burden.

B . Create a single IAM role: This violates the principle of least privilege, as a single role with broad permissions across all services is less secure.

C . Use AWS Organizations: This approach adds unnecessary complexity. Managing permissions at the account level for each microservice is excessive for this use case and doesn't adhere to the principle of least privilege.

asked 27/10/2024
Jacek Rutkowski
41 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first