Deploy Ghost on AWS using CloudFormation - Part 02

Deploy Ghost on AWS using CloudFormation - Part 02

Setup AWS CLI

ยท

2 min read

This post is the second part of the Ghost on AWS series. At this point we have to setup AWS CLI and test it out. The installation process is very straight forward and AWS explains how to configure it in different operating systems. Below is how I ended up doing it on Manjaro Linux.

I'm using YAY as my package manager. It's a wrapper for pacman, the default package manager for Manjaro with bit more features.

Using yay aws-cli brings in all the available versions and just make sure that we pick the version from the community repo.

aws-cli-yay2.jpeg
Installing aws-cli using yay on Manjaro

Once aws-cli installation is done, we have to log into AWS console and create AWS Access Key ID and AWS Secret Access Key for the user that we intend to use with aws-cli.

On the AWS console, go to IAM[1] --> Users[2] and click on the user[3]. Then click on the Security credentials[4] and click on the Create access key[5] to generate the keys.

aws-secret-key.jpeg
Generating AWS Access Key ID and AWS Secret Access Key

This gives us a pop up with the keys. It's always a good idea to download the CSV file.

aws-secret-key-2.png
AWS Secret Keys

Now we are ready to configure the AWS-CLI with a new profile. On the command line, use aws configure --profile blog-admin to create a new profile using the generated keys. If you don't specify --profile, it will create a default profile for us. However it's a good idea to have a named profile as we may have few profiles for different tasks.

aws-cli-config.png
Configure blog-admin profile

Finally we can test if our profile can connect to AWS.

aws-cli-config-2-1.png
Successful test with AWS-CLI

If you can execute a simple command through aws-cli without any errors like mine, we are all good to go with the next steps. In case you got any errors, check out the AWS documentation for troubleshooting tips based on your OS.

That's it for today. Thanks for your time! ๐Ÿ‘‹

ย