Deploying Applications Using Elastic Beanstalk: Best Practices and Considerations

Deploying Applications Using 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 service that allows you to quickly deploy and manage applications in various programming languages, including Java, .NET, PHP, Python, Ruby, and Node.js. Elastic Beanstalk automates the deployment and scaling of your application, and it can also create an Amazon RDS database instance for you.

Here are the explanations for the other options:

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 option is a best practice when deploying applications using Elastic Beanstalk. When you create an Elastic Beanstalk environment, you can choose to create an Amazon RDS database instance at the same time. This ensures that the database instance has the same lifecycle as the rest of the environment, which makes it easier to manage.

C. Amazon RDS Connection String should be stored in a controlled S3 bucket. This option is also a best practice when deploying applications using Elastic Beanstalk. When you store the Amazon RDS connection string in a controlled S3 bucket, you can ensure that only authorized users have access to it. This helps to protect your sensitive data.

D. Amazon RDS Delete Protection should be enabled. This option is also a best practice when deploying applications using Elastic Beanstalk. When you enable Amazon RDS Delete Protection, you prevent accidental deletion of your Amazon RDS database instance. This helps to ensure that your data is always available when you need it.

In summary, while all the other options are best practices when deploying applications using Elastic Beanstalk, option B is NOT a best practice because launching an Amazon RDS database outside of the Elastic Beanstalk environment does not provide the same level of automation and management as when it's launched within the environment.