AWS Certified Developer Associate practice questions, page 10 of 18, with answer review and explanations.
Question 46
A developer is planning to use an Amazon API Gateway and AWS Lambda to provide a REST API. The developer will have three distinct environments to manage: development, test, and production. How should the application be deployed while minimizing the number of resources to manage?
Create a separate API Gateway and separate Lambda function for each environment in the same Region.
Assign a Region for each environment and deploy API Gateway and Lambda to each Region.
Create one API Gateway with multiple stages with one Lambda function with multiple aliases.
Create one API Gateway and one Lambda function, and use a REST parameter to identify the environment.
Question 47
An application needs to use the IP address of the client in its processing. The application has been moved into AWS and has been placed behind an Application Load Balancer (ALB). However, all the client IP addresses now appear to be the same. The application must maintain the ability to scale horizontally. Based on this scenario, what is the MOST cost-effective solution to this problem?
Remove the application from the ALB. Delete the ALB and change Amazon Route 53 to direct traffic to the instance running the application.
Remove the application from the ALB. Create a Classic Load Balancer in its place. Direct traffic to the application using the HTTP protocol.
Alter the application code to inspect the X-Forwarded-For header. Ensure that the code can work properly if a list of IP addresses is passed in the header.
Alter the application code to inspect a custom header. Alter the client code to pass the IP address in the custom header.
Question 48
A developer tested an application locally and then deployed it to AWS Lambda. While testing the application remotely, the Lambda function fails with an access denied message. How can this issue be addressed?
Update the Lambda function's execution role to include the missing permissions.
Update the Lambda function's resource policy to include the missing permissions.
Include an IAM policy document at the root of the deployment package and redeploy the Lambda function.
Redeploy the Lambda function using an account with access to the AdministratorAccess policy.
Question 49
A Developer must analyze performance issues with production-distributed applications written as AWS Lambda functions. These distributed Lambda applications invoke other components that make up the applications. How should the Developer identify and troubleshoot the root cause of the performance issues in production?
Add logging statements to the Lambda functions, then use Amazon CloudWatch to view the logs.
Use AWS CloudTrail and then examine the logs.
Use AWS X-Ray, then examine the segments and errors.
Run Amazon Inspector agents and then analyze performance.
Question 50
A company is building a compute-intensive application that will run on a fleet of Amazon EC2 instances. The application uses attached Amazon EBS disks for storing data. The application will process sensitive information and all the data must be encrypted. What should a Developer do to ensure the data is encrypted on disk without impacting performance?
Configure the Amazon EC2 instance fleet to use encrypted EBS volumes for storing data.
Add logic to write all data to an encrypted Amazon S3 bucket.
Add a custom encryption algorithm to the application that will encrypt and decrypt all data.
Create a new Amazon Machine Image (AMI) with an encrypted root volume and store the data to ephemeral disks.