Grunty
Gruntwork.io

AWS Sample App

This is a sample application that deploys seamlessly into the Gruntwork Reference Architecture and demonstrates many important patterns you may wish to follow in your own apps, such as how to:

  • Package your app using Docker or Packer
  • Do service discovery in dev and prod for microservices and data stores
  • Securely manage secrets: e.g., DB credentials, self-signed TLS certs
  • Automatically apply schema migrations to a database
  • And much more

You can find the code and documentation in the aws-sample-app repo: https://github.com/gruntwork-io/aws-sample-app

Example URLs to try in this app

URLDescription of example
/Home page with docs and examples.
/healthHealth check endpoint (e.g., for load balancers).
/greetingLoading different configs in different environments.
/service/backendService call to the backend microservice.
/service/backend/dbService call to the backend microservice's DB endpoint.
/service/backend/cacheService call to the backend microservice's cache endpoint.
/web-socketsSimple real-time chat with WebSockets.
/errorIntentionally throw an error to test error handling.

How to run this app locally

  1. Checkout the aws-sample-app code:
    git clone git@github.com:gruntwork-io/aws-sample-app.git
  2. Install Docker: https://www.docker.com
  3. Start the app using Docker Compose:
    docker-compose \
      -f docker/frontend.yml \
      -f docker/backend.yml \
      -f docker/mysql.yml \
      -f docker/redis.yml \
      up
  4. Access the frontend app: http://localhost:8080 or https://localhost:8443
  5. Access the backend app: http://localhost:9080 or https://localhost:9443

How to run this app in prod

FormatOrchestrationServices to use
DockerElastic Kubernetes Service (EKS)eks-cluster, k8s-service, ecr-repos
DockerElastic Container Service (ECS)ecs-cluster, ecs-service, ecr-repos
AMIAuto Scaling Groupasg-service

Learn more

Need help?

Reach out to Gruntwork Support for questions, troubleshooting, and design questions:

Community Slackhttps://gruntwork-community.slack.com
Private SlackAsk your company admin for details (Professional Support and Enterprise Subscribers only)
Emailsupport@gruntwork.io