A repository for an article on bobbyhadz.com
If you use CDK v1, switch to the cdk-v1 branch
-
Clone the repository
-
Install the dependencies
npm install
-
create a Key pair with the name of
ec2-key-pair
in your default region -
Create the CDK stack
npx aws-cdk deploy
-
Open the AWS CloudFormation Console and the stack should be created in your default region
-
Copy and paste the public IPv4 url of the EC2 instance in your browser and you should see the response from the nginx server
-
Cleanup
npx aws-cdk destroy