Deploy a Web Application on Amazon EC2
GETTING STARTED GUIDE
Follow step-by-step instructions to build and deploy your first web application using Amazon EC2
In this guide, we will take you through creating an Amazon EC2 instance using AWS CDK, and deploying a web application on it.
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. Amazon EC2’s simple web service interface allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment.
What You Will Learn
In this guide, you will learn how to:
- Create an AWS CDK stack with an Amazon EC2 instance, a security group with inbound access, and an IAM instance profile.
- Install software packages on the EC2 instance's first launch by creating a user data asset.
- Configure the software packages after installation using a script downloaded by the user data.
- Deploying the application using user data.
This tutorial is divided into the following short modules. You must complete each module before moving to the next one.
- Create Your Infrastructure (10 mins): Using AWS CDK to create an Amazon EC2 instance.
- Automate configuration (5 mins): Use the EC2 user data to install all packages, configure them, and deploy the application.
- Deploy your stack (5 mins): Bootstrap and deploy the AWS CDK stack.
- Clean up: In this last part of the guide you learn how to clean up resources after you are done.