Skip to content

bobbyhadz/aws-cdk-ec2-instance-example

Repository files navigation

EC2 Instance Example in AWS CDK - Complete Guide

A repository for an article on bobbyhadz.com

If you use CDK v1, switch to the cdk-v1 branch

How to Use

  1. Clone the repository

  2. Install the dependencies

npm install
  1. create a Key pair with the name of ec2-key-pair in your default region

  2. Create the CDK stack

npx aws-cdk deploy
  1. Open the AWS CloudFormation Console and the stack should be created in your default region

  2. Copy and paste the public IPv4 url of the EC2 instance in your browser and you should see the response from the nginx server

  3. Cleanup

npx aws-cdk destroy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published