@kensio/yulin 1.21.9 → 1.21.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/serve/payload-2/sim-payload-2-endpoint.d.ts +9 -0
- package/dist/serve/payload-2/sim-payload-2-request-context.js +1 -1
- package/dist/service/apigatewayv2/api/sim-http-api-lambda-proxy.factory.d.ts +6 -0
- package/dist/service/apigatewayv2/api/sim-http-api-lambda-proxy.factory.js +2 -0
- package/dist/service/apigatewayv2/api/stage/access-log/sim-http-api-access-log-format.d.ts +8 -0
- package/dist/service/apigatewayv2/api/stage/access-log/sim-http-api-access-log-format.js +36 -0
- package/dist/service/apigatewayv2/api/stage/access-log/sim-http-api-access-log-request.d.ts +53 -0
- package/dist/service/apigatewayv2/api/stage/access-log/sim-http-api-access-log-request.js +1 -0
- package/dist/service/apigatewayv2/api/stage/access-log/sim-http-api-access-log-settings.d.ts +26 -0
- package/dist/service/apigatewayv2/api/stage/access-log/sim-http-api-access-log-settings.js +44 -0
- package/dist/service/apigatewayv2/api/stage/access-log/sim-http-api-access-log-settings.type.d.ts +21 -0
- package/dist/service/apigatewayv2/api/stage/access-log/sim-http-api-access-log-settings.type.js +1 -0
- package/dist/service/apigatewayv2/api/stage/access-log/sim-http-api-access-log-stream-name.d.ts +13 -0
- package/dist/service/apigatewayv2/api/stage/access-log/sim-http-api-access-log-stream-name.js +23 -0
- package/dist/service/apigatewayv2/api/stage/access-log/sim-http-api-access-log-variables.d.ts +17 -0
- package/dist/service/apigatewayv2/api/stage/access-log/sim-http-api-access-log-variables.js +86 -0
- package/dist/service/apigatewayv2/api/stage/sim-http-api-stage.d.ts +9 -0
- package/dist/service/apigatewayv2/api/stage/sim-http-api-stage.js +9 -0
- package/dist/service/apigatewayv2/cfn/stage/sim-cfn-http-api-access-log-settings-properties.d.ts +24 -0
- package/dist/service/apigatewayv2/cfn/stage/sim-cfn-http-api-access-log-settings-properties.js +30 -0
- package/dist/service/apigatewayv2/cfn/stage/sim-cfn-http-api-stage-properties.d.ts +1 -0
- package/dist/service/apigatewayv2/cfn/stage/sim-cfn-http-api-stage-properties.js +10 -4
- package/dist/service/apigatewayv2/command/stage/sim-http-api-access-log-settings-input.d.ts +15 -0
- package/dist/service/apigatewayv2/command/stage/sim-http-api-access-log-settings-input.js +33 -0
- package/dist/service/apigatewayv2/command/stage/sim-http-api-stage-commands.js +4 -0
- package/dist/service/apigatewayv2/command/stage/stage.command.d.ts +2 -0
- package/dist/service/apigatewayv2/serve/auth/sim-http-api-route-authorize-input.d.ts +6 -0
- package/dist/service/apigatewayv2/serve/sim-api-gateway-v2-controller.d.ts +13 -15
- package/dist/service/apigatewayv2/serve/sim-api-gateway-v2-controller.js +26 -60
- package/dist/service/apigatewayv2/serve/sim-http-api-access-log-record.d.ts +31 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-access-log-record.js +88 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-access-log.d.ts +43 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-access-log.js +72 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-endpoint.js +1 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-integration-input.d.ts +22 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-integration-input.js +1 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-integration-invocation.d.ts +5 -22
- package/dist/service/apigatewayv2/serve/sim-http-api-integration-invocation.js +17 -20
- package/dist/service/apigatewayv2/serve/sim-http-api-integration-outcome.d.ts +27 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-integration-outcome.js +13 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-may-invoke.d.ts +19 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-may-invoke.js +19 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-serve-pipeline.d.ts +27 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-serve-pipeline.js +75 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-served.d.ts +22 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-served.js +1 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-serving.d.ts +12 -0
- package/dist/service/apigatewayv2/serve/sim-http-api-serving.js +1 -0
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-properties.d.ts +1 -1
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-properties.js +4 -3
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-names.d.ts +30 -0
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-names.js +91 -0
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-rules.d.ts +7 -12
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-rules.js +12 -92
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js +1 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.js +0 -5
- package/dist/service/lambda/event-source/poll/kinesis/sim-lambda-kinesis-shard-poller.js +1 -1
- package/dist/service/lambda/event-source/poll/sim-lambda-dynamodb-stream-polling.js +1 -1
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-bisect.d.ts +53 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-bisect.js +79 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-progress-state.d.ts +2 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-progress-state.js +3 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-progress.d.ts +14 -1
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-progress.js +24 -2
- package/dist/service/lambda/event-source/sim-lambda-event-source-retry-limits.d.ts +8 -7
- package/dist/service/lambda/event-source/sim-lambda-event-source-retry-limits.js +6 -3
- package/dist/service/lambda/event-source/sim-lambda-stream-retry-limits.d.ts +15 -7
- package/dist/service/lambda/event-source/sim-lambda-stream-retry-limits.js +15 -7
- package/dist/service/logs/group/sim-logs-arn.d.ts +15 -0
- package/dist/service/logs/group/sim-logs-arn.js +33 -0
- package/docs/services/apigatewayv2/README.md +162 -6
- package/docs/services/lambda/README.md +54 -7
- package/package.json +1 -1
|
@@ -2033,6 +2033,41 @@ discarded, and the mapping reads on from behind it.
|
|
|
2033
2033
|
10,000 retries, `-1` to 604,800 seconds) is a `ValidationException`. A queue mapping takes neither,
|
|
2034
2034
|
because a message the handler never takes is left to the queue's own redrive policy.
|
|
2035
2035
|
|
|
2036
|
+
### Splitting a failed batch around the record that broke it
|
|
2037
|
+
|
|
2038
|
+
`BisectBatchOnFunctionError` splits a batch the handler threw on in half, and delivers each half as
|
|
2039
|
+
its own batch. A half that fails is split again, down to a single record. That is how the records
|
|
2040
|
+
beside a poison record get through, and how the poison record ends up delivered on its own and
|
|
2041
|
+
discarded on its own.
|
|
2042
|
+
|
|
2043
|
+
```json
|
|
2044
|
+
{
|
|
2045
|
+
"StartingPosition": "TRIM_HORIZON",
|
|
2046
|
+
"BatchSize": 100,
|
|
2047
|
+
"MaximumRetryAttempts": 10,
|
|
2048
|
+
"BisectBatchOnFunctionError": true
|
|
2049
|
+
}
|
|
2050
|
+
```
|
|
2051
|
+
|
|
2052
|
+
A batch of four whose third record the handler cannot take is delivered as `1, 2, 3, 4`, then
|
|
2053
|
+
`1, 2`, then `3, 4`, then `3` on its own, and finally `4`. The record that broke every batch it was
|
|
2054
|
+
in leaves the mapping under the retry and record-age limits, and reaches the
|
|
2055
|
+
[failure destination](#sending-discarded-stream-batches-to-a-destination) naming one record rather
|
|
2056
|
+
than four.
|
|
2057
|
+
|
|
2058
|
+
Splitting puts the retry count back to the start, so a batch always reaches a single record before
|
|
2059
|
+
the count decides anything. Once it is down to one record, the limits count as they do for any other
|
|
2060
|
+
failing batch. A batch the handler reported partial failures on is left whole, because the report
|
|
2061
|
+
already says which record to go back to.
|
|
2062
|
+
|
|
2063
|
+
The halves carry the batch that failed and nothing else. A record written while the splitting is
|
|
2064
|
+
going on waits behind it and is delivered as part of the batch after it, and the mapping reads at its
|
|
2065
|
+
own batch size again once the whole of the split batch is through.
|
|
2066
|
+
|
|
2067
|
+
`GetEventSourceMapping` and `ListEventSourceMappings` report the setting, and
|
|
2068
|
+
`AWS::Lambda::EventSourceMapping` takes it in a template. Both stream sources have it. A queue
|
|
2069
|
+
mapping is refused for naming it, the way real Lambda refuses one.
|
|
2070
|
+
|
|
2036
2071
|
### Sending discarded stream batches to a destination
|
|
2037
2072
|
|
|
2038
2073
|
DynamoDB Streams and Kinesis mappings accept `DestinationConfig.OnFailure` with a standard SQS
|
|
@@ -2324,8 +2359,15 @@ this, and deploys without hand-editing. The grant CDK writes alongside it is an
|
|
|
2324
2359
|
the three stream actions on the stream ARN and `dynamodb:ListStreams` on every stream, exactly what
|
|
2325
2360
|
the mapping's execution-role check is looking for.
|
|
2326
2361
|
|
|
2327
|
-
|
|
2328
|
-
|
|
2362
|
+
`bisectBatchOnError` is simulated, and is covered under
|
|
2363
|
+
[Splitting a failed batch around the record that broke it](#splitting-a-failed-batch-around-the-record-that-broke-it).
|
|
2364
|
+
The other properties a non-default `DynamoEventSource` adds are recorded rather than acted on. Those
|
|
2365
|
+
are `FilterCriteria`, `ParallelizationFactor` and `TumblingWindowInSeconds`.
|
|
2366
|
+
The mapping deploys, delivers every record whole and unfiltered, and each property it was created
|
|
2367
|
+
without is listed in
|
|
2368
|
+
[`stack.ignoredProperties`](https://yulinsim.dev/services/cloudformation/#properties-a-resource-was-created-without "Properties a Resource was created without")
|
|
2369
|
+
with what the mapping does in its place. `CreateEventSourceMapping` still refuses the same
|
|
2370
|
+
properties, since a caller naming one is asking for behaviour by hand.
|
|
2329
2371
|
|
|
2330
2372
|
A hand-written template or a SAM application usually gives the function the AWS managed policy
|
|
2331
2373
|
`AWSLambdaDynamoDBExecutionRole` instead. Simulated IAM has no model for managed policy ARNs, so
|
|
@@ -4297,11 +4339,12 @@ Current documented limitations:
|
|
|
4297
4339
|
function, and `S3ObjectVersion` on `UpdateFunctionCode`. A versioned location loads the object as
|
|
4298
4340
|
it stands.
|
|
4299
4341
|
- SQS queues, DynamoDB streams and Kinesis streams are the only event sources. Kafka, DocumentDB and
|
|
4300
|
-
Kinesis enhanced fan-out consumers are refused outright
|
|
4301
|
-
`
|
|
4302
|
-
|
|
4303
|
-
`AWS::Lambda::EventSourceMapping`
|
|
4304
|
-
|
|
4342
|
+
Kinesis enhanced fan-out consumers are refused outright. `CreateEventSourceMapping` also refuses
|
|
4343
|
+
`FilterCriteria`, `ScalingConfig`, `ParallelizationFactor`, `TumblingWindowInSeconds` and the
|
|
4344
|
+
other inputs this simulation has no behaviour for. An
|
|
4345
|
+
`AWS::Lambda::EventSourceMapping` naming any of them deploys instead, and records each one against
|
|
4346
|
+
the Resource (see
|
|
4347
|
+
[Properties a Resource was created without](https://yulinsim.dev/services/cloudformation/#properties-a-resource-was-created-without "Properties a Resource was created without")).
|
|
4305
4348
|
- A failed stream batch waits 1, 2, 4, 8 and 16 seconds between attempts, where AWS documents no
|
|
4306
4349
|
delay. That is deliberate. A delay of zero falls due at the instant the clock already reads, and a
|
|
4307
4350
|
handler that always throws would leave `advanceBy` with work falling due forever. A mapping that
|
|
@@ -4309,6 +4352,10 @@ Current documented limitations:
|
|
|
4309
4352
|
discards the batch, where AWS goes on until the records age out a day later. A batch item failure
|
|
4310
4353
|
report counts against the same retries, and never starts them again for the records it rewound
|
|
4311
4354
|
to.
|
|
4355
|
+
- Splitting a batch under `BisectBatchOnFunctionError` puts the retry count back to the start, where
|
|
4356
|
+
AWS counts a bisected batch's deliveries against the same quota. Without that, the simulator's own
|
|
4357
|
+
cap of five attempts would discard a batch of a hundred long before it was down to one record. The
|
|
4358
|
+
splitting still ends on its own, because a batch halves at every step.
|
|
4312
4359
|
- A handler writing into the table whose stream invoked it is refused with
|
|
4313
4360
|
`SimLambdaStreamCascadeError` rather than being delivered its own writes forever. Real Lambda runs
|
|
4314
4361
|
that loop.
|
package/package.json
CHANGED