Staging operating hours and manual Kafka cleanup
ยท One min read
The Atlas Infra staging environment now has scheduled start and stop automation managed through Terraform.
startruns on weekdays at08:00inAmerica/Fortalezastopruns every day at20:00inAmerica/Fortaleza- Kafka cleanup remains available as a dedicated Lambda, but it is now invoked manually instead of through EventBridge
This change reduces the amount of always-on runtime in staging while keeping a manual recovery path for Kafka topic cleanup when operators actually need to reclaim space.
The Kafka cleanup Lambda:
- discovers topics by the prefixes declared in
msk_cleanup_topic_name_prefixes - deletes and recreates the matching topics
- keeps explicit topic definitions from
msk_cleanup_topicsavailable after cleanup
The cleanup flow is intentionally manual because Kafka topic deletion can take long enough that running it on a fixed schedule was not a good cost tradeoff.