Sign inSign up

cabreraevil/amplify-json

By cabreraevil

•Updated over 1 year ago

Image
0

2.2K

cabreraevil/amplify-json repository overview

⁠Quick reference

⁠What is amplify-json?

amplify-json is a containerized tool that fetches metadata from AWS Amplify apps and branches, transforms it into structured JSON, and serves it via a lightweight HTTP server. It is designed to be used in observability dashboards, CI pipelines, or other automation processes that require visibility into Amplify deployments.

⁠How to use this image

⁠docker exec usage (standalone)

docker volume create -d local amplify-json-data && \
docker run --name amplify-json --restart unless-stopped -p 80:80 --env-file .env -v ~/.aws:/root/.aws:ro -v amplify-json-data:/app/public:rw cabreraevil/amplify-json:latest

⁠docker-compose usage

services:
  amplify-json:
    image: cabreraevil/amplify-json:latest
    container_name: amplify-json
    restart: unless-stopped
    ports:
      - 80:80
    env_file:
      - .env
    volumes:
      - ~/.aws:/root/.aws:ro
      - amplify-json-data:/app/public:rw

volumes:
  amplify-json-data:
    driver: local
    name: amplify-json-data

⁠Environment variables

VariableDescriptionDefault
AWS_REGIONAWS region where Amplify apps are deployedca-central-1
AWS_PROFILEAWS CLI profile to usedefault
PORTPort to expose via serve80
INTERVALInterval (in minutes) to regenerate JSON5
CRON_EXPRESSIONOptional custom cron expression (overrides INTERVAL)(unset)
DEBUGEnables verbose entrypoint logging if set to truefalse

⁠Access the generated files

Once the container is running, you can access:

  • http://localhost:80/input.json – raw amplify list output
  • http://localhost:80/output.json – formatted domain and branch metadata

⁠Quick reference (cont.)

⁠Behavior & Scheduling

This image uses a shell-based entrypoint to:

  • Run amplify-generate && amplify-process once at startup
  • Schedule future runs using a cron job
*/5 * * * * root amplify-generate && amplify-process >> /var/log/amplify-json.log

You can customize the cron job via:

  • INTERVAL=10 → */10 * * * *
  • CRON_EXPRESSION="0 * * * *" → runs at the top of every hour

Logs are stored in /var/log/amplify-json.log. Cron jobs are written to /etc/cron.d/amplify.

To view the logs:

docker exec -it amplify-json tail -f /var/log/amplify-json.log

⁠License

This project is released under the MIT License⁠.

Tag summary

Content type

Image

Digest

sha256:ccbd212b1…

Size

175 MB

Last updated

over 1 year ago

docker pull cabreraevil/amplify-json