fix(lambda): delete a function's asynchronous invoke configs with the function (#10009)

DeleteFunction left the function's event invoke configs in the store, so
a function created later under the same name inherited the deleted
one's retry, event age and destination settings. Deleting the whole
function now removes its configs for every qualifier, leaving other
functions alone, including ones whose names share a prefix. Put and
Update of a config take the same per-function lock as the delete, so a
write racing a delete gets ResourceNotFoundException instead of bringing
the settings back.
This commit is contained in:
Niels Kootstra authored and GitHub committed 2026-12-03 07:30:43 -04:00
1 parent f2e0978107
commit d1b30b79db
3 files changed
+73 -33

No files matched your search

+2 -1
View File
@@ -109,7 +109,8 @@ provisions it from a stack. A SAM function's `EventInvokeConfig` expands into th
`sam deploy` does: on `$LATEST`, or on the `AutoPublishAlias` alias, with the inline role policy for
each destination and the SQS queue or SNS topic SAM creates when a destination gives only its `Type`.
Asynchronous invocations apply its retry, event age, destination settings, and dead-letter queue
configurations (`DeadLetterConfig`).
configurations (`DeadLetterConfig`). `DeleteFunction` on the whole function removes its asynchronous
invocation settings for every qualifier, so a function recreated under the same name starts without them.
### Deployment package storage