AWS

How to List S3 Buckets Using AWS CLI

Finding a way to distribute, store and manage all of the data from running applications and delivering content is a big challenge. Building and managing your own repository is an expensive and time-consuming idea as it requires a lot of hardware management. Amazon Simple Storage Service (S3) provides safe and secure data storage for the user. This post explains how to list the S3 buckets using AWS CLI.

List S3 Buckets Using AWS CLI

To list the S3 buckets using AWS CLI, install the AWS CLI installer from the “Windows” tab on the platform (or any other operating system):

Download the AWS CLI file using the link provided in the “Windows” section:

Once the file is downloaded, install the file by clicking on it:

Click on the “Install” button to move forward with the process:

Complete the installation process by clicking on the “Finish” button:

Open the Command Prompt and type the following command to validate the AWS CLI installation:

aws --version

Running the above command will display the installed version of AWS CLI:

Use the following command to configure the AWS CLI:

aws configure

Running this command will prompt the user to provide the Access and Secret keys using AWS IAM user credentials:

Credentials in the above screenshot can be obtained from the IAM user. The user can find the complete process here:

To list the S3 bucket, use the following command:

aws s3 ls

All the S3 buckets will be displayed using the above command:

You have successfully listed the S3 buckets using AWS CLI.

Conclusion

To list the S3 bucket using AWS CLI, download the AWS CLI from the platform and install it on the system. Once the installation is complete, use the “version” command to verify the installed version of the AWS CLI. After that, use the “configure” command to configure the AWS CLI, and then use the “s3 ls” command to list the Amazon S3 bucket associated with your account. This post has demonstrated listing an S3 bucket using AWS CLI.

About the author

Talha Mahmood

As a technical author, I am eager to learn about writing and technology. I have a degree in computer science which gives me a deep understanding of technical concepts and the ability to communicate them to a variety of audiences effectively.