feat(lambda): provision AWS::Lambda::EventInvokeConfig (#3230)

* feat(lambda): provision AWS::Lambda::EventInvokeConfig

The physical id is the registry schema's composite FunctionName|Qualifier
identifier. A create puts the configuration, an update with the same identity
applies the template's settings through the merge-style update call, and a
changed function or qualifier is a replacement whose displaced configuration
the ReplacementCleanup record deletes once the update commits or restores on
rollback. The schema's MaximumRetryAttempts and MaximumEventAgeInSeconds
bounds are checked before any call, as CloudFormation validates them before
the handler runs.

The Lambda docs now list the five event invoke config operations, which the
page wrongly called not implemented, and say that asynchronous invocations do
not yet apply the settings.

* fix(lambda): update the event invoke config in place for equivalent names and roll back in-place changes

A short name and the function's ARN address one configuration, so an update
that changes between them updates in place under the prior physical id
instead of recording a replacement whose cleanup would delete that one
configuration. An in-place update keeps the settings it replaces on the
resource, and a failed stack update puts them back in full. DestinationConfig
is resolved before it is looked at, so a conditional that resolves to
AWS::NoValue is omitted rather than sent as an empty destination set. The
integration test reads stack events with XmlParser.

* fix(lambda): keep the event invoke config rollback snapshot until the restore succeeds

A restore that throws left no snapshot behind, so the next rollback attempt
reported success without restoring anything. The snapshot is now spent only
after the settings are back.
This commit is contained in:
Mario Toffia authored and GitHub committed 2026-09-08 07:34:52 -04:00
1 parent d9cddc56cb
commit af42564cb3
9 files changed
+1435 -2

No files matched your search

+9 -1
View File
@@ -45,6 +45,15 @@ Floci Lambda runs your function code locally inside real Docker containers - clo
| `GetFunctionConcurrency` | Get reserved concurrent executions |
| `DeleteFunctionConcurrency` | Clear reserved concurrent executions |
| `GetAccountSettings` | Account limits plus usage derived from the caller's stored functions |
| `PutFunctionEventInvokeConfig` | Set the asynchronous invocation settings of a function, version or alias (retries, event age, destinations) |
| `UpdateFunctionEventInvokeConfig` | Change some of those settings, leaving the rest as they are |
| `GetFunctionEventInvokeConfig` | Read the asynchronous invocation settings |
| `DeleteFunctionEventInvokeConfig` | Remove the asynchronous invocation settings |
| `ListFunctionEventInvokeConfigs` | List the asynchronous invocation settings of every version and alias of a function |
The event invoke configuration is stored and returned as AWS does, and `AWS::Lambda::EventInvokeConfig`
provisions it from a stack. Asynchronous invocations do not yet apply its retry, event age or
destination settings.
## Hot-Reloading via Reactive S3 Sync
@@ -205,7 +214,6 @@ These AWS Lambda operations have no handler in Floci. Calls will return `404` or
- Layer permissions (`AddLayerVersionPermission`, `RemoveLayerVersionPermission`, `GetLayerVersionPolicy`)
- Provisioned concurrency (`PutProvisionedConcurrencyConfig`, `GetProvisionedConcurrencyConfig`, `ListProvisionedConcurrencyConfigs`, `DeleteProvisionedConcurrencyConfig`)
- Dead-letter, async invoke config, and event invoke config operations
- `InvokeWithResponseStream`
- Code signing management (only `GetFunctionCodeSigningConfig` and `ListFunctionsByCodeSigningConfig` are wired; there is no `PutFunctionCodeSigningConfig` or `CreateCodeSigningConfig`, so no code-signing config can exist and `ListFunctionsByCodeSigningConfig` reports every well-formed ARN as `ResourceNotFoundException` — a malformed ARN or an out-of-range `MaxItems` is rejected with `InvalidParameterValueException` first)