Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Armazenando Fragmentos de Código no AWS S3 | 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
Armazenando Fragmentos de Código no AWS S3

In the previous chapter, we wrote HTML code that allows us to feed the turtle, and in this code, we used an image that we uploaded to AWS S3 in a public bucket. But you may have noticed that reading the code from there was quite inconvenient due to the large number of styles.

I'm leading up to the fact that we can also upload certain code snippets to AWS S3, just like images. For example, in our case, it would be convenient to upload CSS styles for our HTML pages or applications to AWS in order to save space in the code.

Let's take a look at the style file I want to upload to the storage:

css

index.css

copy

To add a file with styles to AWS S3, we first need to create the file and upload it to our public bucket:

To apply these CSS styles in your HTML code, you just need to use a straightforward syntax:

No caso de vincular aos nossos estilos, esta linha ficará assim:

Vamos ver quanto nosso código será reduzido após nossas mudanças e como ele ficará agora:

html

index.html

copy

If you click and follow this link, you'll see the contents of this file, specifically the styles I wrote earlier. This way, both we and the visitors to our website can view the styles stored on AWS and may want to borrow them from us.

js

script.js

copy

Now, we need to use the following syntax to add the script to the code via the link:

Após adicionar o script do AWS S3, nosso código para a tartaruga ficará assim:

Nota

A propósito, você pode mais uma vez visualizar o script diretamente via o link.

html

index.html

copy
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

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