Skip to content

dizlajk/aws-demo

Repository files navigation

AWS demo

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.

Prerequisites

Structure

  • LoadDataFunction folder - simple maven project with lambda function to load data from https://openweathermap.org/current and store it in s3 bucket
  • roles folder - stores ansible roles
  • web folder - stores web files, currently just index.html.
  • deploy_ansible.yaml - ansible deployment script
  • template.yaml - Cloudformation(SAM) template

Deployment

  • 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)

TODO:

  • trigger lambda after deployment
  • variables for buckets, endpoints...
  • partial deployment (redeploy web/lambda only)
  • automatically deploy all web folder
  • CI / CD pipelines

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published