Decommissioning Zappa
Once the SAM stacks have run without a rollback for an agreed soak period:
-
Remove the Zappa deployments. Run
zappa undeploy prod_rules2andzappa undeploy test_rules2from a checkout ofe888027(the Zappa settings are no longer on the new branches), or delete the functions, theny63bqmiolAPI and the EventBridge rules named in Zappa to SAM cutover by hand. -
Delete leftovers that point at functions that no longer exist (production account):
Resource Points at em_events_create_eventsubscription4c7f5d7a-82f7-45f7-873b-cb29a307f16eeventloggerapp-test-rules2(deleted)em_events_create_eventsubscription7fc94fcc-2668-4569-a6b2-bc8dc8d1c578eventloggerapp-prod-rules3(deleted)Event source mapping
7a0533be-11c9-4cd8-acf3-29756079cb4c(disabled,em_events_staging)eventloggerapp-test-rules2(deleted)API
eventloggerapp-prod-rules3nothing
export AWS_PROFILE=prod AWS_REGION=us-east-1 aws sns unsubscribe --subscription-arn arn:aws:sns:us-east-1:625663093496:em_events_create_event:4c7f5d7a-82f7-45f7-873b-cb29a307f16e aws sns unsubscribe --subscription-arn arn:aws:sns:us-east-1:625663093496:em_events_create_event:7fc94fcc-2668-4569-a6b2-bc8dc8d1c578 aws lambda delete-event-source-mapping --uuid 7a0533be-11c9-4cd8-acf3-29756079cb4c aws apigateway get-rest-apis --query "items[?name=='eventloggerapp-prod-rules3'].id" # then delete-rest-api -
Delete the Zappa buckets
app-eventlogger—prod-rules2(production) andapp-eventlogger—test-rules-dev(staging), after emptying them. -
Remove the legacy CodeBuild project
EventLoggerApponce no branch needs it, or keep the webhook filter from the cutover preparation.