Shagon1k / AHurynovich-CV

Aliaksei's curriculum vitae
MIT License
3 stars 0 forks source link

[AH-40] Revise AWS static hosting #104

Closed Shagon1k closed 2 years ago

Shagon1k commented 2 years ago

Description

AWS S3 Static Hosting seems to be outdated solution. Think about altrernatives, e.g. AWS Amplify Hosting - https://aws.amazon.com/amplify/hosting/ https://aws.amazon.com/getting-started/hands-on/build-react-app-amplify-graphql/module-one/ https://catalog.us-east-1.prod.workshops.aws/workshops/841ce16b-9d86-48ac-a3f6-6a1b29f95d2b/en-US/step-3/add-hosting https://levelup.gitconnected.com/aws-react-js-full-stack-development-tutorial-build-a-serverless-tournament-bracket-platform-b6dfbd878d46

Additionaly: Serverless-finch usage is seems to be potential not best approach (no support anymore). Moreover Serverless package update potentialy required.

Notes

Shagon1k commented 2 years ago

AWS Amplify provides more convinient way for static site hositng. Nevertheless, it does all the staff by it's own (building, uploading to S3, hosting, using CloudFront, using Route53), which tangles from more flexible config. In addition there are some limitations using it with CircleCI which needs to be solved. Also it looks like AWS Amplify is more pricy (not so critical for small apps with low level of visits, but still).

Thus, was decided to keep AWS S3 Hosting for now.

Shagon1k commented 2 years ago

Basically AWS Amplify could be used for either hosting "using Git Provider" (based on GitHub/Gitlab/etc. repository) or manualy (e.g. using S3). The first option is not acceptable for current project as it uses CircleCI for CI/CD handling (build -> deploy, build files does NOT stored in Git) + even though it's convinient, still it is less flexible. The second option could be handled by Amplify CLI, but this was it will generate S3 Bucket (for storing App build), automaticaly setup CloudFront and Route53. This is convinient either, but will do all needed staff automatically reducing learning.

Amplify-based approach was tried in scope of that ticket and it's pretty cool. Still was decided to keep existing S3-based hosting approach further.

Shagon1k commented 2 years ago

Serverless (+serverless-finch) terminated as redundat in favor of simple AWS CLI "s3 sync".