Staff

Cameron is a junior studying U.S. history and is currently researching the character and effects of national news media coverage of urban uprisings in the mid- to late 1960s. She also has bylines in…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Upload files and folder to S3 from Ubuntu 20.04 using AWS CLI 2

Applicable for Ubuntu 20.04 and its derivatives.

To make any API call to AWS, we need an IAM user with appropriate permissions. According to your purpose, create an IAM user and get the following

You can download a CSV file with this information provided by AWS after the creation of the IAM user.

Install curl if it is not installed on your machine. Also, you can use wget the default and preinstalled download manager for Ubuntu.

Download the AWS installation file

Go to the downloaded directory and extract the files

Now, run the installation file

This will install the AWS CLI 2 in your system.

To verify the installation, use

To configure your account

Now insert the access key id, secret access key, default region name, your desired output format.

This should configure the CLI with your account credentials.

You can test the configuration by invoking the following commands

This should return all the buckets of your region.

If you do not have a S3 bucket create one.

To upload a single file we use the following

Example:

To upload a folder along with all its files and folders, we can do the followings,

Example:

Add a comment

Related posts:

What is Postcolonial Feminism?

The theory of postcolonialism is a lens that can be applied to any manner of academic pursuits. The movement has roots in academic projects of decolonisation, such as Frantz Fanon’s Black Skin, White…

Of Twitter Bans and Purges

In wake of January 6th’s riots in Washington DC, a number of social media outlets launched overnight campaigns to clean house. Two days after the riots, President Donald Trump was suspended from at…

5 Common Myths About Career

Many people have misconceptions about what it takes to succeed in their careers. There are numerous myths and stereotypes surrounding the topic, which can lead individuals to make poor decisions or…