How to Deploy Your Content Onto AWS Website
In order to deploy your content onto your aws website, you would first need to install awscli, which you could do so by following the steps below:
-
Install pip3:
sudo apt update sudo apt install python3-pip
To check that you have pip installed:
pip3 --version
You should have an output similar to:
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
-
Install awscli:
pip3 install awscli
To check:
aws --version
If that doesn’t work, try closing the window and reopen. It should work after.
-
AWS configuration:
aws configure
It will then ask you for your AWS Access Key ID, AWS Secret Access Key, Default region name, Default output format.
So, where can you get the Access Key ID and AWS Secret Access Key?
a. Sign into your AWS alias user account.
b. Navigate to the bar on the upper right, choose your user name, and then choose My Security Credentials.
c. Click on the security credentials tab. Then click on Create Access Key. Your Access Key ID and AWS Secret Access Key will be generated.
Remember to download or save that somewhere as you will not have access to the Secret Access Key again. Store it in a secured location.
Where can you find the region name? You can get the name from your S3 bucket. Then you would look at the list here to find out the code you would be entering.
You can also find that information from your end point string.
Choose your output format: json, yaml, text, or table
-
Use AWS CLI to deploy the update of your files in the current folder onto S3:
aws s3 sync . s3://my-bucket/
Reference:
https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html https://docs.aws.amazon.com/cli/latest/userguide/cli-services-s3-commands.html