AWS Certified Developer – Associate — Question 272
A developer is writing a new web application that will be deployed and managed with AWS Elastic Beanstalk. The application will include an Amazon RDS DB instance.
What steps should the developer take to access the RDS DB instance from the code? (Choose two.)
Answer options
- A. Modify the endpoint name using either the AWS Management Console or AWS CLI.
- B. Upload the driver to Amazon S3 and reference it in the code.
- C. Download the appropriate database driver and include it with the application.
- D. Construct a connection string using the Elastic Beanstalk environment variables.
- E. Create a CNAME record referencing database instances ALIAS.
Correct answer: C, D
Explanation
To connect an application running in Elastic Beanstalk to an Amazon RDS database, the deployment package must include the appropriate database driver so the application runtime can load it. Additionally, the application code should dynamically build the connection string by reading the database connection details from Elastic Beanstalk environment variables. Other methods, such as storing drivers in Amazon S3 or manually modifying endpoint names, are not standard practices for establishing database connections in this environment.