Best Practices for Deploying Applications with Elastic Beanstalk

What NOT to do when deploying applications with Elastic Beanstalk

Question

What is NOT the best practice when deploying applications using Elastic Beanstalk?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

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

The correct answer is B. Amazon RDS database should be launched outside of the Elastic Beanstalk environment as that provides more flexibility.

Elastic Beanstalk is a Platform as a Service (PaaS) offering from AWS that makes it easy to deploy, manage, and scale applications. Elastic Beanstalk provisions resources like EC2 instances, Auto Scaling groups, and load balancers, and provides a platform for deploying applications. It can also integrate with other AWS services like Amazon RDS for databases.

Best practices for deploying applications using Elastic Beanstalk include:

A. Amazon RDS databases should be included in the Elastic Beanstalk environment as that maintains the same life cycle for all components of the environment.

This is a good practice as it ensures that the database and the application are deployed and scaled together, and have the same lifecycle. This makes it easier to manage the application and ensures that there are no version compatibility issues.

C. Amazon RDS Connection String should be stored in a controlled S3 bucket.

This is a good practice as it ensures that the connection string is secure and only accessible to authorized users. Storing the connection string in a controlled S3 bucket also makes it easier to manage and update.

D. Amazon RDS Delete Protection should be enabled.

This is a good practice as it prevents accidental deletion of the database instance. Enabling delete protection ensures that the database instance is not deleted without proper authorization.

B. Amazon RDS database should be launched outside of the Elastic Beanstalk environment as that provides more flexibility.

This is not a best practice as it can create challenges with managing and scaling the application and the database together. It can also introduce version compatibility issues and make it harder to troubleshoot issues.

In summary, it is best to include the Amazon RDS database in the Elastic Beanstalk environment and store the connection string in a controlled S3 bucket. It is also recommended to enable delete protection for the database instance.