Configuring CLI
After the CLI is installed, it needs to be configured with your AWS account credentials to use it. Follow the below steps to configure it.
- Login and open your AWS account console.
- Click on your account username present at the top right corner and select the “Security credentials” option.
- Scroll down to the “Access keys” section and create on “Create access key”.
- After creating the key on the next page, copy the Access key and Secret Access Key, which we will be using later.
- Then, open your terminal and enter the following command
aws configure
- It will prompt you to enter the Access Key and Secret Access Key and enter those previously copied keys respectively.
- For the Default region name enter us-east-1 and for the Output format, just press enter to keep the default value. Your CLI is now configured!
How to Upload Files to AWS S3 using CLI?
The AWS Simple Storage Service (S3) from Amazon Web Services (AWS) is a widely used cloud storage option for securely overseeing and storing your data. The AWS Command Line Interface (CLI) offers a robust and effective means of engaging with various AWS services, including S3. Within this article, we will provide you with step-by-step instructions on how to utilize the AWS CLI to upload files to AWS S3.