Sunday, 23 February 2020

Using Amazon S3 with the AWS CLI - Part 8

You can access the features of Amazon Simple Storage Service (Amazon S3) using the AWS Command Line Interface (AWS CLI). 

Before you run any commands, set your default credentials. For more information, see Configuring the AWS CLI. 

The AWS CLI provides two tiers of commands for accessing Amazon S3: 

  • The s3 tier consists of high-level commands that simplify performing common tasks, such as creating, manipulating, and deleting objects and buckets. 
  • The s3api tier behaves identically to other AWS services by exposing direct access to all Amazon S3 API operations. It enables you to carry out advanced operations that might not be possible with the following tier's high-level commands alone. 

To get a list of all of the commands available in each tier, use the help argument with the aws s3api or aws s3 commands. 
$ aws s3 help
$ aws s3api help

Using High-Level (s3) Commands with the AWS CLI


This topic describes how you can manage Amazon S3 buckets and objects using high-level aws s3 commands.

Before you run any commands, set your default credentials. For more information, see Configuring the AWS CLI.

Manage Buckets

High-level aws s3 commands support common bucket operations, such as creating, listing, and deleting buckets.

Create a Bucket

Use the s3 mb command to create a bucket. Bucket names must be globally unique and should be DNS compliant. Bucket names can contain lowercase letters, numbers, hyphens, and periods. Bucket names can start and end only with a letter or number, and cannot contain a period next to a hyphen or another period.

$ aws s3 mb s3://bucket-name





No comments:

Post a Comment