Answer: A
Option A is CORRECT because it is best to decouple an Amazon RDS instance from an Elastic Beanstalk environment, especially in the production environment. Launching an RDS database may be suitable for development or PoC environments. Still, in general, it isn’t ideal as it means that termination of the Elastic Beanstalk environment will result in the database`s termination.
Option B is incorrect because the Amazon RDS database should be launched outside of the Elastic Beanstalk environment.This decouples the life-cycle of the database from the life-cycle of the Elastic Beanstalk environment.This protects the database from deletion when the Elastic Beanstalk environment is terminated.It also allows for connecting multiple environments to the same RDS instance and performing advanced deployment strategies such as blue-green deployments.
Option C is incorrect because storing the RDS connection string in an encrypted, secured, and controlled S3 bucket and using Elastic Beanstalk configuration files is a valid method that can be used to securely store and configure this data outside of the application code.
Option D is incorrect because you should protect the RDS databases from accidental deletion by enabling Delete Protection.
Reference:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.RDS.html
https://aws.amazon.com/premiumsupport/knowledge-center/decouple-rds-from-beanstalk/
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/rds-external-credentials.html