Syncret
Syncret reacts to AWS Secrets Manager rotation and change events and automates two follow-up actions: copying selected fields into a dependent secret, and forcing ECS services to redeploy with the latest values. It can notify Google Chat or Slack after every run.
It ships as a minimal container image and runs as an AWS Lambda function triggered by EventBridge.
The problem
When a secret rotates or changes, dependent secrets and running services need to react. Most teams solve this with untested, one-off glue code that never gets reused. Syncret standardizes that pattern into a single, configurable binary that covers the two most common follow-up actions.
How it works
flowchart LR
S["Secrets Manager\n(secret rotates or changes)"]
E["EventBridge\n(CloudTrail event)"]
Sy["Syncret\n(Lambda)"]
TS["Update\ndependent secret\n— optional —"]
CS["Redeploy\nECS services\n— optional —"]
N["Notify\nGoogle Chat / Slack\n— optional —"]
S --> E --> Sy
Sy --> TS
Sy --> CS
Sy --> N
At least one of the two actions must be configured. When both are, the dependent secret is updated first, so redeployed services read the new values.
See How it works for the full design.
Quickstart
The image is published on Docker Hub as fayrus/syncret. Lambda can only run images from ECR, so copy it there first, as the AWS deployment guide explains. Then set these environment variables on your Lambda function.
SYNCRET_PROVIDER=aws
# Required — identifies which secret triggers Syncret
SYNCRET_AWS_SECRET_ARN=arn:aws:secretsmanager:us-east-1:123456789012:secret:my-secret-AbCdEf
SYNCRET_AWS_REGION=us-east-1
# Action 1 — propagate fields to a dependent secret (optional)
SYNCRET_AWS_TARGET_SECRET_ARN=arn:aws:secretsmanager:us-east-1:123456789012:secret:my-app-secret-XyZaBc
SYNCRET_TARGET_SECRET_KEYS=password # or: password:DB_PASS (src:dst remapping)
# Action 2 — restart ECS services (optional)
SYNCRET_AWS_ECS_FORCE_DEPLOY=true
SYNCRET_AWS_ECS_CLUSTER=my-cluster
SYNCRET_AWS_ECS_SERVICES=backend,worker
# Notifications (optional; webhook URLs contain credentials)
SYNCRET_INSTANCE_NAME="V4 Production"
SYNCRET_TIMEZONE=America/Lima
SYNCRET_GCHAT_WEBHOOK="https://chat.googleapis.com/v1/spaces/SPACE/messages?key=KEY&token=TOKEN"
SYNCRET_SLACK_WEBHOOK="https://hooks.slack.com/services/T000/B000/XXXX"
At least one action (SYNCRET_AWS_TARGET_SECRET_ARN or SYNCRET_AWS_ECS_FORCE_DEPLOY=true) must be set or Syncret will refuse to start.
→ Full reference
→ Step-by-step deployment guide
Building from source
make build # build binary (output: bin/syncret)
make test # run tests with race detector
make cover # run tests and show per-function coverage breakdown
make lint # run golangci-lint
make tidy # go mod tidy
make docker-build # build multi-arch image (linux/amd64 + linux/arm64)
Requires Go 1.27.4 or later.
Contributing
See the contributing guide and the Code of Conduct. To report a vulnerability, follow the security policy.
License
Apache 2.0 — see LICENSE.