Database deployment via Elastic Beanstalk

Hands-On Lab

 

Photo of Rachel Craft

Rachel Craft

Training Architect

Length

00:30:00

Difficulty

Beginner

This activity will cover the following objectives with Elastic Beanstalk: -Demonstrate the ability to provision a RDS database -Demonstrate the ability to assign an RDS instance size -Demonstrate the ability have an RDS instance be highly available Please note that the Security Group setting has been moved to the INSTANCE box when creating your application.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Database Deployment via Elastic Beanstalk

Introduction

In this lab, we'll learn how to deploy a database using Elastic Beanstalk.

This written guide focuses on the steps necessary to complete the lab. It is recommended that you watch the accompanying video guide for extra details, clarifications, and insights.

Provision an RDS Instance

To begin, log in to AWS and navigate to the Elastic Beanstalk console.

  • Click the Get started button.
  • For the application name, enter rds_deployment.
  • From the platform menu, select Node.js.
  • Click Configure more options.
  • Find the section titled Database and click Modify.
  • From the engine menu, select mysql.
  • From the instance class menu, select db.t2.micro.
  • Enter testuser for the username, and enter a password that you can easily remember.
  • Select Create snapshot from the retention menu.
  • Select High from the availability menu.
  • Click Save.

Configure Networking

Now that we've created the database, we'll need to configure networking settings.

  • Find the section titled Network and click Modify.
  • From the VPC dropdown menu, select the preconfigured VPC.
  • Check the box next to Public IP address.
  • Select all three availability zones under Instance subnets.
  • Under Instance security groups, select default.
  • Under Database settings, select all three availability zones.
  • Click Save.
  • Click Create app.

Check Configuration

Finally, we'll check to make sure that our database was successfully provisioned.

  • Navigate to the RDS console from the AWS services list.
  • Click DB Instances. We should see the MySQL instance that we just created.
  • Return to the Elastic Beanstalk dashboard.
  • Click the name of the environment we just created (Custom-env).
  • Click the URL at the top of the page.
  • We should see a "Congratulations" page, indicating that the app is running and the database is working properly.

Conclusion

In this lab, we learned to provision an RDS database using Elastic Beanstalk. For more information, we recommend following along with the video associated with this lab.