Simple SAM application with a frontend deployed to s3 bucket. SAM app consists of one lambda function scheduled to run every day at 10AM, also callable by API gateway. Frontend part is just index file that loads data stored on s3 and displays them.
LoadDataFunction
folder - simple maven project with lambda function to load data from https://openweathermap.org/current and store it in s3 bucketroles
folder - stores ansible rolesweb
folder - stores web files, currently just index.html.deploy_ansible.yaml
- ansible deployment scripttemplate.yaml
- Cloudformation(SAM) template
- run this command in project root folder:
ansible-playbook deploy_ansible.yml
- trigger LoadDataFunction lambda to load data (you can find the url in aws console: CloudFormation -> demo -> Outputs -> LoadDataAPI)
- open web the application (you can find the url in aws console: S3 -> demo.web.bucket -> Properties -> Static website hosting -> Endpoint)
- trigger lambda after deployment
- variables for buckets, endpoints...
- partial deployment (redeploy web/lambda only)
- automatically deploy all web folder
- CI / CD pipelines