Provisioning RDS Instance and Preserving Database on AWS Elastic Beanstalk - DVA-C01 Exam Answers

Provisioning RDS Instance and Preserving Database on AWS Elastic Beanstalk

Prev Question Next Question

Question

Your development team is testing out an application that is being deployed onto AWS Elastic Beanstalk.

The application needs to have an RDS Instance provisioned as part of the Elastic Beanstalk setup.

They also want to ensure that the database is preserved for analysis even after the environment is torn down.

How can you achieve both the requirements? Choose 2 answers from the options given below.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - A and C.

The AWS documentation mentions that you should ensure the Retention field is marked as "Create Snapshot" for saving a snapshot before the termination of the environment.

This will ensure that we can create a database from the snapshot that is created.

AWS Elastic Beanstalk provides support for running RDS instances in your Elastic Beanstalk environment.

This works great for development and testing environments.

However, it isn't ideal for a production environment because it ties the lifecycle of the database instance to the lifecycle of your application's environment.

Option B is incorrect since it is not necessary that the engine type only has to be MySQL.

Option D is incorrect since the option should be “Create Snapshot”.

For more information on managing a database in Elastic Beanstalk, please refer to the below URL-

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.db.html

Note:

For a production environment, AWS recommends launching a database instance outside of your environment and configure your application to connect to it outside of the functionality provided by Elastic Beanstalk.

Using a database instance that is external to your environment requires additional security groups and connection string configuration.

However, it also lets you connect to the database from multiple environments, use database types not supported with integrated databases, perform blue/green deployments, and tear down your environment without affecting the database instance.

Database settings

Choose an engine and instance type for your environment's database.

Engine mysql ’

Engine version 5.6.37 vv

Instance class — db.t2.micro 0
Storage 5 GB

Choose a number between 5 GB and 1024 GB.

Retention Create snapshot i

When you terminate your environment, your database instance is also terminated. Choose Create snapsh
to save a snapshot of the database prior to termination. Snapshots incur standard storage charges.

Availability — Low (one AZ) ’

To achieve the requirements of provisioning an RDS instance as part of the Elastic Beanstalk setup and preserving the database even after the environment is torn down, we can follow the below steps:

  1. Ensure the database is created as part of the Elastic Beanstalk development or testing environment:

We can create an RDS instance and attach it to the Elastic Beanstalk environment using the AWS Management Console or Elastic Beanstalk CLI. This ensures that the database is part of the environment and can be easily managed and scaled along with the application. When the environment is terminated, the RDS instance associated with the environment will also be terminated.

  1. Ensure that the retention for the database is marked as “Create Snapshot”:

By selecting the “Create Snapshot” retention option, we can preserve the database data even after the environment is torn down. When the RDS instance is terminated, a final snapshot of the database is created, which can be used to restore the database later. We can also specify a retention period for snapshots, which will automatically delete snapshots older than the specified period.

  1. Ensure that you only choose the MySQL engine type:

This option is not relevant to the requirements mentioned in the question. Elastic Beanstalk supports multiple database engines, including MySQL, PostgreSQL, and SQL Server. We can choose the database engine that best suits our application's requirements.

  1. Ensure that the retention for the database is marked as “Automated Backup”:

While this option can be used to preserve the database, it does not satisfy the requirement of preserving the database even after the environment is torn down. Automated backups are incremental backups taken daily, which can be used to restore the database to a specific point in time. However, these backups are stored in the same region as the RDS instance and will be deleted if the RDS instance is terminated.

In conclusion, options A and C are the correct answers to achieve the requirements of provisioning an RDS instance as part of the Elastic Beanstalk setup and preserving the database even after the environment is torn down.