AWS Certified Developer Associate · Free Practice Question Medium
Question 32
A company is migrating a stateful web service into the AWS cloud. The objective is to refactor the application to realize the benefits of cloud computing. How can the Developer leading the project refactor the application to enable more elasticity? (Select TWO.)
-
A
Store the session state in an Amazon DynamoDB table
-
B
Use Amazon CloudFront with a Web Application Firewall
-
C
Use an Elastic Load Balancer and Auto Scaling Group
-
D
Store the session state in an Amazon RDS database
-
E
Use Amazon CloudFormation and the Serverless Application Model
Reveal correct answers
Correct answers: A, C
Explanation
As this is a stateful application the session data needs to be stored somewhere. Amazon DynamoDB is designed to be used for storing session data and it highly scalable. To add elasticity to the architecture an Amazon Elastic Load Balancer (ELB) and Amazon EC2 Auto Scaling group (ASG) can be used.
With this architecture the web service can scale elastically using the ASG and the ELB will distribute traffic to all new instances that the ASG launches. This is a good example of utilizing some of the key benefits of refactoring applications into the AWS cloud.
CORRECT: "Use an Elastic Load Balancer and Auto Scaling Group" is a correct answer.
CORRECT: "Store the session state in an Amazon DynamoDB table" is also a correct answer.
INCORRECT: "Use Amazon CloudFormation and the Serverless Application Model" is incorrect. AWS SAM is used in CloudFormation templates for expressing serverless applications using a simplified syntax. This application is not a serverless application.
INCORRECT: "Use Amazon CloudFront with a Web Application Firewall" is incorrect neither protection from web exploits nor improved performance for content delivery are requirements in this scenario.
INCORRECT: "Store the session state in an Amazon RDS database" is incorrect as RDS is not suitable for storing session state data. DynamoDB is a better fit for this use case.
References:
https://docs.aws.amazon.com/aws-sdk-php/v2/guide/feature-dynamodb-session-handler.html
Save time with our AWS cheat sheets:
https://digitalcloud.training/aws-elastic-load-balancing-aws-elb/
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
