Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Amazon Simple Storage Service Configuration | AWS S3 Overview
Cloud Technologies Introduction

Amazon Simple Storage Service ConfigurationAmazon Simple Storage Service Configuration

Starting to learn AWS services should begin with the basics.

Therefore, we will start with a service like S3, which is used by everyone, always. Even the images I include in this course are stored on S3, any media information, and sometimes code snippets or scripts that perform various functions.

Let's start with the definition:

Amazon Simple Storage Service (Amazon S3) is a cloud storage service provided by Amazon Web Services (AWS) that offers high scalability, data availability, security, and performance. This means you can use S3 to store and retrieve any amount of data at any time and from anywhere on the internet.

Creating a Bucket

Now, let's start working with S3. First, we need to access this service by clicking on the "Services" button in the top left corner. Then, at the bottom, we'll see the "Storage" section, and after clicking on it, a menu will appear where we should select S3:

After that, we'll go to the menu, where you can see a short video guide from Amazon, which will tell you how to work with S3, as well as a lot of other information. You can review it if you want, but what we're interested in now is the "Create Bucket" button, which is shown in the screenshot below:

Now you need to configure your bucket. You can read about each of the settings yourself, or you can replicate my settings listed below.

Note

Note that I'm making the bucket public, meaning the media in this bucket will be accessible to everyone. Later, I'll configure it so that only GET requests are allowed, meaning users can only view and download media, not edit, create, or delete them.

Image 1
Image 2
Image 3
Image 4
Image 5
Image 6

If you've done everything correctly, you should see a picture like this in front of you:

Now let's configure our bucket so that users can only use GET requests, for example, to view the image on the screen or download it. To do this, we need to go to the bucket, navigate to the permissions section, and scroll down to the Bucket Policy section.

Then we need to add this code there:

This JSON is an Amazon S3 access policy that defines permissions for accessing objects in the S3 bucket. In AWS, these policies are used to manage access to resources in cloud services. In this case, the policy describes the following permissions:

  • Version: This indicates the syntax version of the policy. "2012-10-17" is the latest and most widely used version of policies;
  • Statement: This is the main element of the policy, which contains an array of individual statements.

Each statement (in this case, one) contains:

  • Effect: Determines whether the action is allowed or not. In this case, "Allow" means the action is permitted;
  • Principal: Specifies who receives the permission. Here, "*" means the permission is granted to all users;
  • Action: Specifies which action is allowed. "s3:GetObject" allows users to access (download) objects (files) in the S3 bucket;
  • Resource: Indicates the specific resource to which the permissions apply. "arn:aws:s3:::codefinity-aws-course/*" refers to all objects (indicated by the asterisk *) in the S3 bucket named "codefinity-aws-course".

Your permission file should look like this:

Note

Ignore any warnings from AWS because we are learning. We need the files in the bucket to be public so that we can visually see how the storage works through the code.

Great, we have successfully created a bucket and configured it for our needs. In the upcoming chapters, we will learn how to upload media files into it and use it in our code and applications.

Everything was clear?

Section 2. Chapter 2
course content

Course Content

Cloud Technologies Introduction

Amazon Simple Storage Service ConfigurationAmazon Simple Storage Service Configuration

Starting to learn AWS services should begin with the basics.

Therefore, we will start with a service like S3, which is used by everyone, always. Even the images I include in this course are stored on S3, any media information, and sometimes code snippets or scripts that perform various functions.

Let's start with the definition:

Amazon Simple Storage Service (Amazon S3) is a cloud storage service provided by Amazon Web Services (AWS) that offers high scalability, data availability, security, and performance. This means you can use S3 to store and retrieve any amount of data at any time and from anywhere on the internet.

Creating a Bucket

Now, let's start working with S3. First, we need to access this service by clicking on the "Services" button in the top left corner. Then, at the bottom, we'll see the "Storage" section, and after clicking on it, a menu will appear where we should select S3:

After that, we'll go to the menu, where you can see a short video guide from Amazon, which will tell you how to work with S3, as well as a lot of other information. You can review it if you want, but what we're interested in now is the "Create Bucket" button, which is shown in the screenshot below:

Now you need to configure your bucket. You can read about each of the settings yourself, or you can replicate my settings listed below.

Note

Note that I'm making the bucket public, meaning the media in this bucket will be accessible to everyone. Later, I'll configure it so that only GET requests are allowed, meaning users can only view and download media, not edit, create, or delete them.

Image 1
Image 2
Image 3
Image 4
Image 5
Image 6

If you've done everything correctly, you should see a picture like this in front of you:

Now let's configure our bucket so that users can only use GET requests, for example, to view the image on the screen or download it. To do this, we need to go to the bucket, navigate to the permissions section, and scroll down to the Bucket Policy section.

Then we need to add this code there:

This JSON is an Amazon S3 access policy that defines permissions for accessing objects in the S3 bucket. In AWS, these policies are used to manage access to resources in cloud services. In this case, the policy describes the following permissions:

  • Version: This indicates the syntax version of the policy. "2012-10-17" is the latest and most widely used version of policies;
  • Statement: This is the main element of the policy, which contains an array of individual statements.

Each statement (in this case, one) contains:

  • Effect: Determines whether the action is allowed or not. In this case, "Allow" means the action is permitted;
  • Principal: Specifies who receives the permission. Here, "*" means the permission is granted to all users;
  • Action: Specifies which action is allowed. "s3:GetObject" allows users to access (download) objects (files) in the S3 bucket;
  • Resource: Indicates the specific resource to which the permissions apply. "arn:aws:s3:::codefinity-aws-course/*" refers to all objects (indicated by the asterisk *) in the S3 bucket named "codefinity-aws-course".

Your permission file should look like this:

Note

Ignore any warnings from AWS because we are learning. We need the files in the bucket to be public so that we can visually see how the storage works through the code.

Great, we have successfully created a bucket and configured it for our needs. In the upcoming chapters, we will learn how to upload media files into it and use it in our code and applications.

Everything was clear?

Section 2. Chapter 2
some-alt