Lab Details
This lab will show you how to create a static website in Amazon S3 Bucket with Terraform.
Duration: 60 minutes
AWS Region: US East, N. Virginia us-east-1
Introduction
What is a static website?
These websites are the simplest to build and the most straightforward.
A static web page is one that is presented to the user exactly as it is stored.
It contains fixed content. Each page is coded with HTML and displays the exact same information to all visitors.
They can be used without any web programming or database design.
Because they do not interact with plugins or databases, they are very secure.
They are reliable. If an attack occurs on the server, the redirection to the closest safest node takes place.
Because there is no backend from which to retrieve information, static websites load very quickly.
Hosting the website is affordable because it doesn't require any additional components.
It is simple to scale a website by increasing your bandwidth.
What is Amazon3?
Simple Storage Service stands for S3.
It allows object storage via a web service interface.
Every object is saved as a file, with metadata and assigned an ID number.
Objects uploaded via S3 are kept in containers called "Buckets", which have unique names worldwide. They are responsible for organizing the Amazon S3 namespace at its highest level.
Amazon S3 makes buckets in the area you specify.
These buckets can be assigned permissions to allow or deny data transactions.
What is Terraform?
It is an open-source IaaC software tool (Infrastructure as a code), where you can define and create resources using providers that are part of the declarative configuration language JSON.
Terraform allows you to package code and reuse it in the form of modules.
It supports many cloud infrastructure providers, including AWS, Azure and GCP, IBM Cloud, OCI and IBM Cloud.
Terraform is divided into four main commands
Terraform init
Terraform plan
Terraform is available
terraform destroy