In this week we going to use IAC with terraform to create our infrastucture on AWS. My challenge was to deploy a serveless aplication using at least one api gateway and two lambdas. For my challenge i decide to deploy an S3 static website, this kind of service is free and you only need to upload you page in html and set all the setting on the bucket for locate the index file and error file and allow the bucket to act as website. Static Website.
To use this project first you need to clone the repo and then export AIM credentials on your system the variables are: AWS_ACCESS_KEY_ID & AWS_SECRET_ACCESS_KEY with this variables you have access to the AWS enviroment and you can start creating the infraestructure.
1)Inicialize terraform.
terraform init
- Review the terraform plan
terraform plan
- Deploy the infraestructure
terraform apply
The output called "Bucket_Direction" is the URL of the S3 static website.