- You need an AWS account (should be free for this project)
- install AWS CLI
- get programmatic access keys and add to aws cli
- Make a public S3 bucket, upload
index.html, and make it Static Website Hosting - Create a Civic application
- set the whitelisted domain to the one created by S3
- Generate Civic application keys and store in Paramter Store
- You only need App ID, Secret, and Secret Signing Key
- Use a path like
/myFirstCivicIntegration/APP_IDor whatever, then updateserverless.ymlwhere it is referenced (4 places)
- Update
color.jsandserverless.ymlwith the domain created by S3 (3 places) npm installthen runsls deploy- Update
index.htmlwith the lambda endpoint generated (1 place) - Test by browsing to the S3 domain, use phone to authenticate, check responses
- https://blog.ippon.tech/integrating-civic-into-a-static-serverless-website-part-1-of-2/
- https://blog.ippon.tech/integrating-civic-into-a-static-serverless-website-part-2-of-2/
The differences include:
- Custom domain name
- SSL certificate for static site and api
- Just
index.htmlinstead of html, css, js, png files