Amazon Simple Storage Service: Getting Started Guide

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Amazon Simple Storage Service

Getting started guide


Amazon Simple Storage Service Getting started guide

Amazon Simple Storage Service: Getting started guide


Copyright © 2020 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

Amazon's trademarks and trade dress may not be used in connection with any product or service that is not
Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or
discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may
or may not be affiliated with, connected to, or sponsored by Amazon.
Amazon Simple Storage Service Getting started guide

Table of Contents
Getting started .................................................................................................................................. 1
Setting up Amazon S3 ........................................................................................................................ 2
Sign up for AWS ........................................................................................................................ 2
Create an IAM user ..................................................................................................................... 2
Sign in as an IAM user ................................................................................................................ 3
Creating a bucket ............................................................................................................................... 5
Uploading an object to a bucket .......................................................................................................... 6
Viewing an object .............................................................................................................................. 7
Copying an object .............................................................................................................................. 8
Deleting objects and buckets ............................................................................................................... 9
Emptying your bucket ................................................................................................................ 9
Deleting an object ...................................................................................................................... 9
Deleting your bucket ................................................................................................................ 10
Where do I go from here? ................................................................................................................. 11
Common use scenarios ............................................................................................................. 11
Considerations going forward .................................................................................................... 11
AWS Account and Security Credentials ................................................................................ 12
Security ........................................................................................................................... 12
AWS integration ............................................................................................................... 12
Pricing ............................................................................................................................ 12
Advanced Amazon S3 features ................................................................................................... 12
Development resources ............................................................................................................. 13
Reference resources .................................................................................................................. 13
About this guide .............................................................................................................................. 14

iii
Amazon Simple Storage Service Getting started guide

Getting started with Amazon Simple


Storage Service
Amazon Simple Storage Service (Amazon S3) is storage for the internet. You can use Amazon S3 to store
and retrieve any amount of data at any time, from anywhere on the web. You can accomplish these tasks
using the AWS Management Console, which is a simple and intuitive web interface.

To get the most out of Amazon S3, you need to understand a few simple concepts. Amazon S3 stores
data as objects within buckets. An object consists of a file and optionally any metadata that describes
that file. To store an object in Amazon S3, you upload the file you want to store to a bucket. When you
upload a file, you can set permissions on the object and any metadata.

Buckets are the containers for objects. You can have one or more buckets. For each bucket, you can
control access to it (who can create, delete, and list objects in the bucket), view access logs for it and its
objects, and choose the geographical region where Amazon S3 will store the bucket and its contents.

This guide introduces you to Amazon S3 and explains how to use the AWS Management Console to
complete the following tasks:

• Setting up Amazon S3 (p. 2)


• Creating a bucket (p. 5)
• Uploading an object to a bucket (p. 6)
• Viewing an object (p. 7)
• Copying an object (p. 8)
• Deleting objects and buckets (p. 9)

For information about Amazon S3 features, pricing, and frequently asked questions, see the Amazon S3
product page.

1
Amazon Simple Storage Service Getting started guide
Sign up for AWS

Setting up Amazon S3
When you sign up for AWS, your AWS account is automatically signed up for all services in AWS,
including Amazon S3. You are charged only for the services that you use.

With Amazon S3, you pay only for what you use. For more information about Amazon S3 features and
pricing, see Amazon S3. If you are a new Amazon S3 customer, you can get started with Amazon S3 for
free. For more information, see AWS Free Tier.

To get started with Amazon S3, follow these steps:

Topics
• Sign up for AWS (p. 2)
• Create an IAM user (p. 2)
• Sign in as an IAM user (p. 3)

Sign up for AWS


If you do not have an AWS account, complete the following steps to create one.

To sign up for an AWS account

1. Open https://portal.aws.amazon.com/billing/signup.
2. Follow the online instructions.

Part of the sign-up procedure involves receiving a phone call and entering a verification code on the
phone keypad.

AWS sends you a confirmation email after the sign-up process is complete. At any time, you can view
your current account activity and manage your account by going to https://aws.amazon.com/ and
choosing My Account.

Create an IAM user


When you first create an Amazon Web Services (AWS) account, you begin with a single sign-in identity.
That identity has complete access to all AWS services and resources in the account. This identity is called
the AWS account root user. When you sign in, enter the email address and password that you used to
create the account.
Important
We strongly recommend that you do not use the root user for your everyday tasks, even the
administrative ones. Instead, adhere to the best practice of using the root user only to create
your first IAM user. Then securely lock away the root user credentials and use them to perform
only a few account and service management tasks. To view the tasks that require you to sign in
as the root user, see AWS Tasks That Require Root User.

If you signed up for AWS but have not created an IAM user for yourself, follow these steps.

2
Amazon Simple Storage Service Getting started guide
Sign in as an IAM user

To create an administrator user for yourself and add the user to an administrators group
(console)

1. Use your AWS account email address and password to sign in as the AWS account root user to the
IAM console at https://console.aws.amazon.com/iam/.
Note
We strongly recommend that you adhere to the best practice of using the Administrator
IAM user below and securely lock away the root user credentials. Sign in as the root user
only to perform a few account and service management tasks.
2. In the navigation pane, choose Users and then choose Add user.
3. For User name, enter Administrator.
4. Select the check box next to AWS Management Console access. Then select Custom password, and
then enter your new password in the text box.
5. (Optional) By default, AWS requires the new user to create a new password when first signing in. You
can clear the check box next to User must create a new password at next sign-in to allow the new
user to reset their password after they sign in.
6. Choose Next: Permissions.
7. Under Set permissions, choose Add user to group.
8. Choose Create group.
9. In the Create group dialog box, for Group name enter Administrators.
10. Choose Filter policies, and then select AWS managed -job function to filter the table contents.
11. In the policy list, select the check box for AdministratorAccess. Then choose Create group.
Note
You must activate IAM user and role access to Billing before you can use the
AdministratorAccess permissions to access the AWS Billing and Cost Management
console. To do this, follow the instructions in step 1 of the tutorial about delegating access
to the billing console.
12. Back in the list of groups, select the check box for your new group. Choose Refresh if necessary to
see the group in the list.
13. Choose Next: Tags.
14. (Optional) Add metadata to the user by attaching tags as key-value pairs. For more information
about using tags in IAM, see Tagging IAM Entities in the IAM User Guide.
15. Choose Next: Review to see the list of group memberships to be added to the new user. When you
are ready to proceed, choose Create user.

You can use this same process to create more groups and users and to give your users access to your AWS
account resources. To learn about using policies that restrict user permissions to specific AWS resources,
see Access Management and Example Policies.

Sign in as an IAM user


After you create an IAM user, you can sign in to AWS with your IAM user name and password.

Before you sign in as an IAM user, you can verify the sign-in link for IAM users in the IAM console. On the
IAM Dashboard, under IAM users sign-in link, you can see the sign-in link for your AWS account. The URL
for your sign-in link contains your AWS account ID without dashes (‐).

If you don't want the URL for your sign-in link to contain your AWS account ID, you can create an account
alias. For more information, see Creating, Deleting, and Listing and AWS Account Alias in the IAM User
Guide.

3
Amazon Simple Storage Service Getting started guide
Sign in as an IAM user

To sign in as an AWS user

1. Sign out of the AWS Management Console.


2. Enter your sign-in link.

Your sign-in link includes your AWS account ID (without dashes) or your AWS account alias:

https://aws_account_id_or_alias.signin.aws.amazon.com/console

3. Enter the IAM user name and password that you just created.

When you're signed in, the navigation bar displays "your_user_name @ your_aws_account_id".

4
Amazon Simple Storage Service Getting started guide

Creating a bucket
Now that you've signed up for AWS you're ready to create a bucket using the AWS Management Console.
Every object in Amazon S3 is stored in a bucket. Before you can store data in Amazon S3, you must
create a bucket.
Note
You are not charged for creating a bucket. You are charged only for storing objects in the
bucket and for transferring objects in and out of the bucket. The charges that you incur through
following the examples in this guide are minimal (less than $1). For more information about
storage charges, see Amazon S3 pricing.

To create a bucket

1. Sign in to the AWS Management Console and open the Amazon S3 console at https://
console.aws.amazon.com/s3/.
2. Choose Create bucket.

The Create bucket page opens.


3. In Bucket name, enter a DNS-compliant name for your bucket.

The bucket name must:

• Be unique across all of Amazon S3.


• Be between 3 and 63 characters long.
• Not contain uppercase characters.
• Start with a lowercase letter or number.

After you create the bucket, you can't change its name. For information about naming buckets, see
Rules for Bucket Naming in the Amazon Simple Storage Service Developer Guide.
Important
Avoid including sensitive information, such as account numbers, in the bucket name. The
bucket name is visible in the URLs that point to the objects in the bucket.
4. In Region, choose the AWS Region where you want the bucket to reside.

Choose a Region close to you to minimize latency and costs and address regulatory requirements.
Objects stored in a Region never leave that Region unless you explicitly transfer them to another
Region. For a list of Amazon S3 AWS Regions, see AWS Service Endpoints in the Amazon Web
Services General Reference.
5. In Bucket settings for Block Public Access, keep the values set to the defaults.

By default Amazon S3 blocks all public access to your buckets. We recommend that you leave all
Block Public Access settings enabled. For more information about blocking public access, see Using
Amazon S3 Block Public Access in the Amazon Simple Storage Service Developer Guide.
6. Choose Create bucket.

You've created a bucket in Amazon S3.

To add an object to your bucket, see Uploading an object to a bucket (p. 6).

5
Amazon Simple Storage Service Getting started guide

Uploading an object to a bucket


Now that you've created a bucket, you're ready to upload an object to it. An object can be any kind of
file: a text file, a photo, a video, and so on.

To upload an object to a bucket

1. In the Bucket list, choose the name of the bucket that you want to upload your object to.
2. On the Overview tab for your bucket, choose Upload or Get Started.
3. To choose the file to upload, in the Upload dialog box, choose Add files.
4. Choose a file to upload, and then choose Open.
5. Choose Upload.

You've successfully uploaded an object to your bucket.

To view your object, see Viewing an object (p. 7).

6
Amazon Simple Storage Service Getting started guide

Viewing an object
Now that you've uploaded an object to a bucket, you can view information about your object and
download the object to your local computer.

To download an object from a bucket

1. In the Buckets list, choose the name of the bucket that you created.
2. In the Name list, choose the name of the object that you uploaded.

For your selected object, the object overview panel opens.


3. On the Overview tab, review information about your object.
4. To view the object in your browser, choose Open.
5. To download the object to your computer, choose Download.

You've successfully downloaded your object.

To copy and paste your object within Amazon S3, see Copying an object (p. 8).

7
Amazon Simple Storage Service Getting started guide

Copying an object
You've already added an object to a bucket and downloaded the object. Now, you can copy the object.
You can copy an object to a location within a bucket or to a location in another bucket. In this tutorial,
you create a folder and copy your object to it.

To copy an object to a folder

1. In the Buckets list, choose your bucket name.


2. Choose Create folder.
3. Configure your folder:

a. Enter a folder name (for example, favorite-pics.


b. For the folder encryption setting, choose None.
c. Choose Save.
4. Select the check box beside the object that you want to copy.
5. Choose Actions, and choose Copy.
6. Choose the destination bucket name.
7. Choose your folder, and choose Choose.
8. Under Review, confirm the copy details, and choose Copy.

Amazon S3 copies your object to the destination folder.


9. To view your copied object in the destination folder, on the Overview tab, choose the folder name.

In the folder, you see the copied object.

To delete an object and a bucket in Amazon S3, see Deleting objects and buckets (p. 9).

8
Amazon Simple Storage Service Getting started guide
Emptying your bucket

Deleting objects and buckets


When you no longer need an object or a bucket, we recommend that you delete them to prevent further
charges. If you completed this getting started walkthrough as a learning exercise and do not plan to use
your bucket or objects, we recommend that you delete your bucket so that charges no longer accrue.
Before you delete your bucket, you must empty the bucket or delete the objects in the bucket. After you
delete your objects and bucket, they are no longer available.

If you want to continue to use the same bucket name, we recommend that you delete the objects or
empty the bucket but do not delete the bucket. After you delete a bucket, the name becomes available
to reuse. However, another account might create a bucket with the same name before you have a chance
to reuse it.

Topics
• Emptying your bucket (p. 9)
• Deleting an object (p. 9)
• Deleting your bucket (p. 10)

Emptying your bucket


If you plan to delete your bucket, you must first empty your bucket, which deletes all the objects in the
bucket.

To empty a bucket

1. In the Buckets list, select the bucket that you want to empty, and then choose Empty.
2. To confirm that you want to empty the bucket and delete all the objects in it, in Empty bucket,
enter the name of the bucket.
Important
Emptying the bucket cannot be undone. Objects added to the bucket while the empty
bucket action is in progress will be deleted.
3. To empty the bucket and delete all the objects in it, and choose Empty.

An Empty bucket: Status page opens that you can use to review a summary of failed and successful
object deletions.
4. To return to your bucket list, choose Exit.

Deleting an object
If you want to choose which objects you delete without emptying all the objects from your bucket, you
can delete an object.

1. In the Buckets list, choose the name of the bucket that you want to delete an object from.
2. In the Name list, select the check box for the object that you want to delete.
3. Choose Actions, and then choose Delete.
4. In the Delete objects dialog box, verify that the name of the object, and choose Delete.

9
Amazon Simple Storage Service Getting started guide
Deleting your bucket

Deleting your bucket


After you empty your bucket or delete all the objects from your bucket, you can delete your bucket.

1. To delete a bucket, in the Buckets list, select the bucket.


2. Choose Delete.
3. To confirm deletion, in Delete bucket, enter the name of the bucket.
Important
Deleting a bucket cannot be undone. Bucket names are unique. If you delete your bucket,
another AWS user can use the name. If you want to continue to use the same bucket name,
don't delete your bucket. Instead, empty and keep the bucket.
4. To delete your bucket, choose Delete bucket.

For more information about using Amazon S3, see Where do I go from here? (p. 11)

10
Amazon Simple Storage Service Getting started guide
Common use scenarios

Where do I go from here?


In the preceding examples, you learned how to perform some basic Amazon S3 tasks. For more in-depth
information, see one of the following Amazon S3 guides:

• The Amazon Simple Storage Service Console User Guide to learn more about using the Amazon S3
console.
• The Amazon Simple Storage Service Developer Guide to find detailed information about Amazon S3
features and code examples to support those features.
• The Amazon Simple Storage Service API Reference to find details about the Amazon S3 REST API.

The following topics explain various ways in which you can gain a deeper understanding of Amazon S3
so that you can implement it in your applications.

Topics
• Common use scenarios (p. 11)
• Considerations going forward (p. 11)
• Advanced Amazon S3 features (p. 12)
• Development resources (p. 13)
• Reference resources (p. 13)

Common use scenarios


The AWS Solutions site lists many of the ways you can use Amazon S3. The following list summarizes
some of those ways.

• Backup and storage – Provide data backup and storage services for others.
• Application hosting – Provide services that deploy, install, and manage web applications.
• Media hosting – Build a redundant, scalable, and highly available infrastructure that hosts video,
photo, or music uploads and downloads.
• Software delivery – Host your software applications that customers can download.

For more information, see AWS Solutions.

Considerations going forward


This section introduces you to topics you should consider before launching your own Amazon S3 product.

Topics
• AWS Account and Security Credentials (p. 12)
• Security (p. 12)
• AWS integration (p. 12)
• Pricing (p. 12)

11
Amazon Simple Storage Service Getting started guide
AWS Account and Security Credentials

AWS Account and Security Credentials


When you signed up for the service, you created an AWS account using an email address and password.
Those are your AWS account root user credentials. As a best practice, you should not use your root
user credentials to access AWS. Nor should you give your credentials to anyone else. Instead, create
individual users for those who need access to your AWS account. First, create an AWS Identity and Access
Management (IAM) administrator user for yourself and use it for your daily work. For details, see Creating
Your First IAM Admin User and Group in the IAM User Guide. Then create additional IAM users for other
people. For details, see Creating Your First IAM Delegated User and Group in the IAM User Guide.

If you're an account owner or administrator and want to know more about IAM, see the product
description at https://aws.amazon.com/iam or the technical documentation in the IAM User Guide.

Security
Amazon S3 provides authentication mechanisms to secure data stored in Amazon S3 against
unauthorized access. Unless you specify otherwise, only the AWS account owner can access data
uploaded to Amazon S3. For more information about how to manage access to buckets and objects, go
to Identity and Access Management in Amazon S3 in the Amazon Simple Storage Service Developer Guide.

You can also encrypt your data before uploading it to Amazon S3.

AWS integration
You can use Amazon S3 alone or in concert with one or more other Amazon products. The following are
the most common products used with Amazon S3:

• Amazon EC2
• Amazon EMR
• Amazon SQS
• Amazon CloudFront

Pricing
Learn the pricing structure for storing and transferring data on Amazon S3. For more information, see
Amazon S3 pricing.

Advanced Amazon S3 features


The examples in this guide show how to accomplish the basic tasks of creating a bucket, uploading and
downloading data to and from it, and moving and deleting the data. The following table summarizes
some of the most common advanced functionality offered by Amazon S3. Note that some advanced
functionality is not available in the AWS Management Console and requires that you use the Amazon
S3 API. All advanced functionality and how to use it is described in the Amazon Simple Storage Service
Developer Guide.

Link Functionality

Requester Pays Buckets Learn how to configure a bucket so that a


customer pays for the downloads they make.

12
Amazon Simple Storage Service Getting started guide
Development resources

Link Functionality

Using BitTorrent With Amazon S3 Use BitTorrent, which is an open, peer-to-peer


protocol for distributing files.

Versioning Learn about Amazon S3 versioning capabilities.

Hosting Static Websites Learn how to host a static website on Amazon S3.

Object Lifecycle Management Learn how to manage the lifecycle of objects


in your bucket. Lifecycle management
includes expiring objects and archiving objects
(transitioning objects to the S3 S3 Glacier
storage class).

Development resources
To help you build applications using the language of your choice, we provide the following resources:

• Sample Code and Libraries – The AWS Developer Center has sample code and libraries written
especially for Amazon S3.

You can use these code samples as a means of understanding how to implement the Amazon S3 API.
For more information, see the AWS Developer Center.
• Tutorials – Our Resource Center offers more Amazon S3 tutorials.

These tutorials provide a hands-on approach for learning Amazon S3 functionality. For more
information, see Articles & Tutorials.
• Customer Forum – We recommend that you review the Amazon S3 forum to get an idea of what other
users are doing and to benefit from the questions they ask.

The forum can help you understand what you can and can't do with Amazon S3. The forum also serves
as a place for you to ask questions that other users or AWS representatives might answer. You can use
the forum to report issues with the service or the API. For more information, see Discussion Forums.

Reference resources
The following list shows additional resources that you can use to further your understanding of Amazon
S3.

• The Amazon Simple Storage Service Console User Guide describes all of the AWS Management
Console functions related to Amazon S3.
• The Amazon Simple Storage Service Developer Guide provides a detailed discussion of the service.

It includes an architectural overview, detailed concept descriptions, and procedures for using the API.
• The Amazon Simple Storage Service API Reference provides a detailed discussion of the actions and
parameters in Amazon S3.
• The Service Health Dashboard shows you the status of the Amazon S3 web service.

The dashboard shows you whether Amazon S3 (and all other AWS products) are functioning properly.
For more information, see the Service Health Dashboard.

13
Amazon Simple Storage Service Getting started guide

About this guide


This is the Amazon Simple Storage Service Getting Started Guide.

Amazon Simple Storage Service is frequently referred to within this guide as "Amazon S3." All copyrights
and legal protections still apply.

14

You might also like