AWS CloudFormation from yaml template

To create a WordPress site on AWS, we can use the CloudFormation service. We simply upload a prepared wordpress.yaml template that contains the instructions for creating the WordPress site and all the required resources.

GitHub repository with the wordpress.yaml template:

How to deploy

  1. Open the CloudFormation service in the AWS Console.
  2. Click Create stack.
  3. Under Specify template, choose Upload a template file and select the wordpress.yaml file.
  4. Enter wordpress as the Stack name.
  5. Under Parameters, enter mykey for KeyName.
    NOTE: An EC2 key pair named mykey must already exist in the AWS Region where you are creating the stack. AWS stores the public key, while you should keep the corresponding private key (.pem) securely on your computer.
  6. Add the following tag:
    Key: system
    Value: wordpress
  7. Continue through the remaining steps and click Submit on the final page.

Now wait a few minutes for CloudFormation to finish creating the resources. Once the stack has been created, go to Outputs, where you will find the addresses for your WordPress site.

Congrats! You have just created your first website on AWS!

Leave a Reply

Your email address will not be published. Required fields are marked *.