Deploy Ghost on AWS using CloudFormation - Part 02
Setup AWS CLI
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.
yay aws-cli brings in all the available versions and just make sure that we pick the version from the community repo.
|Installing aws-cli using yay on Manjaro
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 --> Users and click on the user. Then click on the Security credentials and click on the Create access key to generate the keys.
|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 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.
|Configure blog-admin profile
Finally we can test if our profile can connect to AWS.
|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! 👋