Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Configuração do Amazon Simple Storage Service | Visão Geral do AWS S3
Introdução à Computação em Nuvem
course content

Conteúdo do Curso

Introdução à Computação em Nuvem

Introdução à Computação em Nuvem

1. Introdução às Tecnologias de Nuvem
2. Visão Geral do AWS S3
3. Visão Geral do EC2
4. Gerenciamento de RDS

book
Configuração do Amazon Simple Storage Service

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:

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.

carousel-imgcarousel-imgcarousel-imgcarousel-imgcarousel-img

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:

Este JSON é uma política de acesso do Amazon S3 que define permissões para acessar objetos no bucket S3. Na AWS, essas políticas são usadas para gerenciar o acesso a recursos em serviços de nuvem. Neste caso, a política descreve as seguintes permissões:

  • Version: Indica a versão da sintaxe da política. "2012-10-17" é a versão mais recente e amplamente utilizada das políticas;

  • Statement: Este é o elemento principal da política, que contém uma matriz de declarações individuais.

Cada declaração (neste caso, uma) contém:

  • Effect: Determina se a ação é permitida ou não. Neste caso, "Allow" significa que a ação é permitida;

  • Principal: Especifica quem recebe a permissão. Aqui, "*" significa que a permissão é concedida a todos os usuários;

  • Action: Especifica qual ação é permitida. "s3:GetObject" permite que os usuários acessem (baixem) objetos (arquivos) no bucket S3;

  • Resource: Indica o recurso específico ao qual as permissões se aplicam. "arn:aws:s3:::codefinity-aws-course/*" refere-se a todos os objetos (indicado pelo asterisco *) no bucket S3 chamado "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.

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 2
We're sorry to hear that something went wrong. What happened?
some-alt