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. Its 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.
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 --> Users and click on the user. Then click on the Security credentials and click on the Create access key to generate the keys.
This gives us a pop up with the keys. It's always a good idea to download the CSV file.
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 dont specify --profile, it will create a default profile for us. However its a good idea to have a named profile as we may have few profiles for different tasks.
Finally we can test if our profile can connect to AWS.
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!