Deploys to AWS with GitHub Action and Terraform
Uses a GitHub Action gamer-speed-test.github\workflows\deploy.yml
- Currently most of this is commented out as need AWS keys
GitHub Action -> Terraform -> S3 Website Bucket Created -> AWS Lambda function Created -> -> hello-world JS app deployed to Lambda -> API Gateway Created -> Pushes all files in /public -> S3 Website Bucket
Result - Website stored in S3 - AWS Lambda function
- Pull repo down
- Install terraform
- Configure AWS Keys
- In serverless-infrastructure-template\terraform\variables.tf change the bucket name to something unique on line 12
default = "<ADD_NEW_NAME>"
cd terraform
terraform init
terraform plan
terraform apply
- terraform will output the s3 bucket name, lambda function and api gateway url
terraform destroy
sudo apt update
sudo apt -y install nodejs
node -v
cd debugging node debug.js Javascript file debugging/debug.js