Database deployment via Elastic Beanstalk
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.
Database Deployment via Elastic Beanstalk
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.
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.
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.
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.