...

/

Infrastructure as Code: Deploy CloudFormation Stack

Infrastructure as Code: Deploy CloudFormation Stack

Objective

  • Recreate our infrastructure using CloudFormation.

Steps

  • Deploy the CloudFormation Stack.

Deploying

Now it’s time to deploy our infrastructure. Let’s run the deploy-infra.sh command. We can check the status of our stack from the CloudFormation console. The events tab shows which resources are being created, modified, or destroyed.

When successful, the script should show us the URL for reaching our application.

Press + to interact
./deploy-infra.sh
Waiting for changeset to be created..
Waiting for stack create/update to complete
Successfully created/updated stack - awsbootstrap
[
"http://ec2-35-174-3-173.compute-1.amazonaws.com:8080"
]

And now we can test that our application is up and running with curl.

Press + to interact
curl ec2-35-174-3-173.compute-1.amazonaws.com:8080
Hello World

Now we can commit our infrastructure ...