# Deploy Ghost on AWS using CloudFormation - Part 02

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](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html#cli-quick-configuration) how to configure it in different operating systems. Below is how I ended up doing it on [Manjaro Linux](https://manjaro.org/).

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](https://cdn.hashnode.com/res/hashnode/image/upload/v1650695267842/BZAMWhHQp.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](https://cdn.hashnode.com/res/hashnode/image/upload/v1650695505495/Nku9VEa-M.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](https://cdn.hashnode.com/res/hashnode/image/upload/v1650696055401/2mjTxlCcu.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](https://cdn.hashnode.com/res/hashnode/image/upload/v1650696219799/GVTRxo6TH.png)|
|:--:|
|*Configure blog-admin profile*|

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


|![aws-cli-config-2-1.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1650700678943/xHGrmO-Of.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](AWS documentation) for troubleshooting tips based on your OS.

That's it for today. Thanks for your time! 👋


