Developed by Etienne Jacquot (2024)
- Web app promo page for Soundcloud content, etc: http://saysdont.ejacquot.com, or really whatever event I want to celebrate with a vanity domain single-page application 🥳🥳
- > Some additional testing & promo stuff!
Use Terraform to deploy the simple web app infrastructure, and git and eb to version & deploy the latest promo page ideas all to AWS.
⚠️ Update Terraform with Your AWS Named Profile:
-
Try the following for a simple eb deployment IaC deployment. This spins out a simple AWS Elastic Beanstalk environment using NodeJS on Linux:
# clone the simple web app repo git clone atnsaysdont cd atnsaysdont/ ## deploy your eb infra # create your environment on AWS terraform init terraform apply
-
When your terraform apply is finished with, proceed to deploy a new app version to eb. This will update the live promo page with the latest changes commited to git on the current branch:
## deploy your eb code # check configs eb init -i --profile=atn-developer # confirm configs eb status --profile=atn-developer # deploy to environment eb deploy --profile=atn-developer
if you get an error about certificate, run to check the value associated w your domain name (i.e. saysdont.com)
aws acm list-certificates --region=us-east-1 --profile=atn-developer | jq -r '.CertificateSummaryList[] | select(.DomainName=="*.saysdont.com") | .CertificateArn'
-- this guide assumes you have the ACM already created!
-
When you want take down the live promo page (to save money, of course 💸):
# tear down environment terraform destroy
🥳 Your simple web app soundcloud promo page: https://saysdont.com
- Deploy the app to EB (here), per instructions above 🤗
- Load balancer listener needs
:443
for*.saysdont.com
forwarding to HTTP LB, see here - ALB security group needs inbound rule, I set public via
:443
on0.0.0.0/0
, but really just for inbound from cloudfront serving the app, see (here) - cloudfront distribution takes some time to point to origin, update origin with Elastic Beanstalk CNAME
- A Route53 hosted zone for *.saysdont.com (here)& ACM certificate for
*.saysdont.com
(here) linking to cloudfront CDN - Continue to think about how to accomplish most of all this using terraform!
-
Demo for a simple React single-page app
-
To test local npm changes (http://localhost:3000):
npm run start-local
-
- Deployed on AWS Elastic Beanstalk
⚠️ Use an AWS IAM Role (see here) for AWS ElasticBeanstalkAdminister & Route53FullAccess as named profile[atn-developer]
in~/.aws/credentials
config.
some errors for npm install on ec2
t4g.nano
ort4g.micro
, cheapest ist4g.small
. See details at https://aws.amazon.com/ec2/instance-types/t4/