@kensio/yulin 1.21.2 → 1.21.4
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/service/athena/engine/sim-athena-column-types.d.ts +2 -0
- package/dist/service/athena/engine/sim-athena-column-types.js +4 -0
- package/dist/service/athena/engine/sim-athena-delimited-format.d.ts +7 -0
- package/dist/service/athena/engine/sim-athena-delimited-format.js +51 -0
- package/dist/service/athena/engine/sim-athena-engine-result.js +5 -0
- package/dist/service/athena/engine/sim-athena-engine-run.d.ts +22 -2
- package/dist/service/athena/engine/sim-athena-engine-run.js +21 -31
- package/dist/service/athena/engine/sim-athena-loaded-tables.d.ts +10 -0
- package/dist/service/athena/engine/sim-athena-loaded-tables.js +35 -0
- package/dist/service/athena/engine/sim-athena-parquet-module.d.ts +25 -0
- package/dist/service/athena/engine/sim-athena-parquet-module.js +39 -0
- package/dist/service/athena/engine/sim-athena-parquet-records.d.ts +13 -0
- package/dist/service/athena/engine/sim-athena-parquet-records.js +57 -0
- package/dist/service/athena/engine/sim-athena-query-engine.d.ts +23 -5
- package/dist/service/athena/engine/sim-athena-query-engine.js +31 -10
- package/dist/service/athena/engine/sim-athena-record-reader.d.ts +12 -6
- package/dist/service/athena/engine/sim-athena-record-reader.js +28 -53
- package/dist/service/athena/engine/sim-athena-sql-translation.d.ts +15 -9
- package/dist/service/athena/engine/sim-athena-sql-translation.js +25 -13
- package/dist/service/athena/engine/sim-athena-sqlite-values.d.ts +5 -0
- package/dist/service/athena/engine/sim-athena-sqlite-values.js +24 -1
- package/dist/service/athena/engine/sim-athena-table-objects.d.ts +7 -2
- package/dist/service/athena/engine/sim-athena-table-objects.js +8 -4
- package/dist/service/athena/engine/sim-athena-table-rows.js +4 -3
- package/dist/service/athena/engine/sim-athena-turn-down.d.ts +26 -0
- package/dist/service/athena/engine/sim-athena-turn-down.js +43 -0
- package/dist/service/athena/execution/sim-athena-query-completion.d.ts +3 -1
- package/dist/service/athena/execution/sim-athena-query-completion.js +7 -1
- package/dist/service/athena/index.d.ts +1 -1
- package/dist/service/athena/index.js +1 -1
- package/dist/service/athena/result/sim-athena-query-answer.d.ts +12 -0
- package/dist/service/athena/result/sim-athena-query-answer.js +26 -4
- package/dist/service/athena/sim-athena-answered-query.fixture.d.ts +2 -0
- package/dist/service/athena/sim-athena-answered-query.fixture.js +1 -0
- package/dist/service/athena/sim-athena-engine.fixture.d.ts +20 -0
- package/dist/service/athena/sim-athena-engine.fixture.js +34 -0
- package/dist/service/cloudformation/authorize/sim-cloudformation-authorization.d.ts +23 -0
- package/dist/service/cloudformation/authorize/sim-cloudformation-authorization.js +37 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-copier.d.ts +2 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-copier.js +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-file.d.ts +7 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-file.js +13 -1
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-pruner.d.ts +6 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-pruner.js +7 -1
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/notify/sim-cdk-bucket-deploy-notifier.d.ts +50 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/notify/sim-cdk-bucket-deploy-notifier.js +71 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/sim-cdk-bucket-deployment.js +6 -1
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/source/sim-cdk-bucket-deploy-source.d.ts +5 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/source/sim-cdk-bucket-deploy-source.js +7 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-arn.d.ts +9 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-arn.js +12 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-changes.d.ts +42 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-changes.js +69 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-commands.d.ts +62 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-commands.js +89 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-execution.d.ts +31 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-execution.js +59 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-failure.d.ts +21 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-failure.js +19 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-input.d.ts +17 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-input.js +18 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-stack-id.d.ts +18 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-stack-id.js +13 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-stack.d.ts +45 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-stack.js +52 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-type.d.ts +12 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set-type.js +21 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set.d.ts +54 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set.js +49 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set.type.d.ts +35 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-set.type.js +1 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-sets.d.ts +53 -0
- package/dist/service/cloudformation/changeset/sim-cfn-change-sets.js +83 -0
- package/dist/service/cloudformation/command/create-change-set/create-change-set.command.d.ts +32 -0
- package/dist/service/cloudformation/command/create-change-set/create-change-set.command.js +1 -0
- package/dist/service/cloudformation/command/create-change-set/create-change-set.handler.d.ts +38 -0
- package/dist/service/cloudformation/command/create-change-set/create-change-set.handler.js +80 -0
- package/dist/service/cloudformation/command/create-stack/create-stack.handler.js +12 -12
- package/dist/service/cloudformation/command/delete-change-set/delete-change-set.command.d.ts +22 -0
- package/dist/service/cloudformation/command/delete-change-set/delete-change-set.command.js +1 -0
- package/dist/service/cloudformation/command/delete-change-set/delete-change-set.handler.d.ts +27 -0
- package/dist/service/cloudformation/command/delete-change-set/delete-change-set.handler.js +35 -0
- package/dist/service/cloudformation/command/delete-stack/delete-stack.command.d.ts +6 -0
- package/dist/service/cloudformation/command/delete-stack/delete-stack.handler.d.ts +11 -0
- package/dist/service/cloudformation/command/delete-stack/delete-stack.handler.js +15 -1
- package/dist/service/cloudformation/command/describe-change-set/describe-change-set.command.d.ts +48 -0
- package/dist/service/cloudformation/command/describe-change-set/describe-change-set.command.js +1 -0
- package/dist/service/cloudformation/command/describe-change-set/describe-change-set.handler.d.ts +23 -0
- package/dist/service/cloudformation/command/describe-change-set/describe-change-set.handler.js +52 -0
- package/dist/service/cloudformation/command/describe-stacks/describe-stacks.handler.d.ts +3 -0
- package/dist/service/cloudformation/command/describe-stacks/describe-stacks.handler.js +8 -4
- package/dist/service/cloudformation/command/describe-stacks/sim-cfn-described-stacks.d.ts +18 -6
- package/dist/service/cloudformation/command/describe-stacks/sim-cfn-described-stacks.js +22 -7
- package/dist/service/cloudformation/command/describe-stacks/sim-cfn-stack-describer.js +1 -1
- package/dist/service/cloudformation/command/execute-change-set/execute-change-set.command.d.ts +25 -0
- package/dist/service/cloudformation/command/execute-change-set/execute-change-set.command.js +1 -0
- package/dist/service/cloudformation/command/execute-change-set/execute-change-set.handler.d.ts +31 -0
- package/dist/service/cloudformation/command/execute-change-set/execute-change-set.handler.js +37 -0
- package/dist/service/cloudformation/command/list-change-sets/list-change-sets.command.d.ts +36 -0
- package/dist/service/cloudformation/command/list-change-sets/list-change-sets.command.js +1 -0
- package/dist/service/cloudformation/command/list-change-sets/list-change-sets.handler.d.ts +26 -0
- package/dist/service/cloudformation/command/list-change-sets/list-change-sets.handler.js +39 -0
- package/dist/service/cloudformation/command/update-stack/update-stack-previous-values.d.ts +31 -0
- package/dist/service/cloudformation/command/update-stack/update-stack-previous-values.js +52 -0
- package/dist/service/cloudformation/command/update-stack/update-stack-template.d.ts +22 -0
- package/dist/service/cloudformation/command/update-stack/update-stack-template.js +34 -0
- package/dist/service/cloudformation/command/update-stack/update-stack.command.d.ts +17 -1
- package/dist/service/cloudformation/command/update-stack/update-stack.handler.js +8 -15
- package/dist/service/cloudformation/error/sim-cloudformation.error.d.ts +21 -0
- package/dist/service/cloudformation/error/sim-cloudformation.error.js +25 -0
- package/dist/service/cloudformation/parameters/pseudo/sim-cfn-pseudo-parameters.d.ts +7 -0
- package/dist/service/cloudformation/parameters/pseudo/sim-cfn-pseudo-parameters.js +3 -1
- package/dist/service/cloudformation/parameters/sim-cfn-parameters.d.ts +9 -0
- package/dist/service/cloudformation/parameters/sim-cfn-parameters.js +12 -0
- package/dist/service/cloudformation/resource/delete/sim-cfn-resource-delete-operation.d.ts +4 -0
- package/dist/service/cloudformation/resource/delete/sim-cfn-resource-delete-operation.js +10 -0
- package/dist/service/cloudformation/resource/delete/sim-cfn-resource-retention.d.ts +44 -0
- package/dist/service/cloudformation/resource/delete/sim-cfn-resource-retention.js +33 -0
- package/dist/service/cloudformation/resource/factory/sim-cfn-resource-factory.type.d.ts +9 -0
- package/dist/service/cloudformation/resource/sim-cfn-resource-record.d.ts +15 -0
- package/dist/service/cloudformation/resource/sim-cfn-resource-record.js +21 -1
- package/dist/service/cloudformation/resource/sim-cfn-resource.d.ts +9 -7
- package/dist/service/cloudformation/resource/sim-cfn-resource.js +11 -11
- package/dist/service/cloudformation/resource/sim-cfn-resource.type.d.ts +19 -0
- package/dist/service/cloudformation/resource/state/sim-cfn-resource-deletion-state.d.ts +3 -3
- package/dist/service/cloudformation/resource/state/sim-cfn-resource-deletion-state.js +3 -3
- package/dist/service/cloudformation/resource/template/sim-cfn-resource-template-reader.d.ts +4 -0
- package/dist/service/cloudformation/resource/template/sim-cfn-resource-template-reader.js +9 -0
- package/dist/service/cloudformation/resource/update/sim-cfn-resource-update-validator.d.ts +26 -0
- package/dist/service/cloudformation/resource/update/sim-cfn-resource-update-validator.js +55 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-api-auth.d.ts +37 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-api-auth.js +77 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-api-auth.types.d.ts +51 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-api-auth.types.js +10 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-api-authorizers.d.ts +11 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-api-authorizers.js +34 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-api-identity.d.ts +21 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-api-identity.js +31 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-authorizer-definition.d.ts +14 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-authorizer-definition.js +1 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-authorizer-function.d.ts +26 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-authorizer-function.js +58 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-event-authorization.d.ts +18 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-event-authorization.js +89 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-http-api-auth.d.ts +15 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-http-api-auth.js +65 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-http-jwt-authorizer.d.ts +13 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-http-jwt-authorizer.js +60 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-http-lambda-authorizer.d.ts +13 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-http-lambda-authorizer.js +50 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-identity-prefixes.d.ts +13 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-identity-prefixes.js +30 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-identity-source.d.ts +26 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-identity-source.js +44 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-rest-api-auth.d.ts +15 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-rest-api-auth.js +59 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-rest-cognito-authorizer.d.ts +11 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-rest-cognito-authorizer.js +43 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-rest-lambda-authorizer.d.ts +15 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-rest-lambda-authorizer.js +67 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-template-api-auth.d.ts +26 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-template-api-auth.js +61 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-unsupported-auth.d.ts +18 -0
- package/dist/service/cloudformation/sam/api/auth/sim-cfn-sam-unsupported-auth.js +59 -0
- package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-template.factory.js +1 -1
- package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api.d.ts +4 -0
- package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api.js +12 -5
- package/dist/service/cloudformation/sam/api/sim-cfn-sam-rest-api-template.factory.js +1 -1
- package/dist/service/cloudformation/sam/api/sim-cfn-sam-rest-api.js +7 -3
- package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-api-event.js +7 -3
- package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-cognito-event.d.ts +26 -0
- package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-cognito-event.js +88 -0
- package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-declared-event.d.ts +12 -0
- package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-declared-event.js +1 -0
- package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-function-events.js +8 -5
- package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-event.js +23 -1
- package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-route.d.ts +9 -2
- package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-route.js +5 -3
- package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-implicit-http-api.d.ts +6 -1
- package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-implicit-http-api.js +7 -1
- package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-triggered-user-pool.d.ts +19 -0
- package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-triggered-user-pool.js +69 -0
- package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-template.factory.d.ts +5 -0
- package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-template.factory.js +3 -1
- package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-type.d.ts +8 -0
- package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-type.js +8 -0
- package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-url.js +1 -4
- package/dist/service/cloudformation/sam/function/sim-cfn-sam-function.d.ts +6 -4
- package/dist/service/cloudformation/sam/function/sim-cfn-sam-function.js +2 -4
- package/dist/service/cloudformation/sam/sim-cfn-sam-error.d.ts +31 -0
- package/dist/service/cloudformation/sam/sim-cfn-sam-error.js +17 -0
- package/dist/service/cloudformation/sam/sim-cfn-sam-expansion.js +11 -6
- package/dist/service/cloudformation/sdk/sim-cloudformation-sdk-command-router.js +20 -0
- package/dist/service/cloudformation/serve/sim-cloudformation-api.d.ts +4 -3
- package/dist/service/cloudformation/serve/sim-cloudformation-api.js +6 -3
- package/dist/service/cloudformation/serve/sim-cloudformation-change-set-api.d.ts +10 -0
- package/dist/service/cloudformation/serve/sim-cloudformation-change-set-api.js +94 -0
- package/dist/service/cloudformation/sim-cloudformation.d.ts +31 -0
- package/dist/service/cloudformation/sim-cloudformation.js +56 -9
- package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-map.js +1 -0
- package/dist/service/cloudformation/stack/sim-cfn-deleted-stacks.d.ts +20 -0
- package/dist/service/cloudformation/stack/sim-cfn-deleted-stacks.js +23 -0
- package/dist/service/cloudformation/stack/sim-cfn-deployed-stack.type.d.ts +6 -0
- package/dist/service/cloudformation/stack/sim-cfn-stack-id.d.ts +30 -0
- package/dist/service/cloudformation/stack/sim-cfn-stack-id.js +24 -0
- package/dist/service/cloudformation/stack/sim-cfn-stack-resource-operations.d.ts +51 -3
- package/dist/service/cloudformation/stack/sim-cfn-stack-resource-operations.js +84 -6
- package/dist/service/cloudformation/stack/sim-cfn-stack.d.ts +28 -16
- package/dist/service/cloudformation/stack/sim-cfn-stack.js +59 -32
- package/dist/service/cloudformation/stack/sim-cfn-stack.type.d.ts +7 -1
- package/dist/service/cloudformation/stack/teardown/sim-cfn-stack-deletion-lifecycle.d.ts +7 -1
- package/dist/service/cloudformation/stack/teardown/sim-cfn-stack-deletion-lifecycle.js +3 -1
- package/dist/service/cloudformation/stack/teardown/sim-cfn-stack-resource-batch-deleter.d.ts +3 -0
- package/dist/service/cloudformation/stack/teardown/sim-cfn-stack-resource-batch-deleter.js +3 -0
- package/dist/service/cloudformation/stack/teardown/sim-cfn-stack-resource-deleter.d.ts +3 -0
- package/dist/service/cloudformation/stack/teardown/sim-cfn-stack-resource-deleter.js +2 -1
- package/dist/service/cloudformation/stack/teardown/sim-cfn-stack-retained-logical-ids.d.ts +18 -0
- package/dist/service/cloudformation/stack/teardown/sim-cfn-stack-retained-logical-ids.js +30 -0
- package/dist/service/cloudformation/stack/update/sim-cfn-stack-update-guard.d.ts +9 -0
- package/dist/service/cloudformation/stack/update/sim-cfn-stack-update-guard.js +14 -0
- package/dist/service/cloudformation/stack/update/sim-cfn-stack-update-lifecycle.d.ts +25 -14
- package/dist/service/cloudformation/stack/update/sim-cfn-stack-update-lifecycle.js +41 -24
- package/dist/service/cloudformation/stack/update/sim-cfn-stack-update-plan.d.ts +16 -1
- package/dist/service/cloudformation/stack/update/sim-cfn-stack-update-plan.js +27 -0
- package/dist/service/cloudformation/stack/update/sim-cfn-stack-updater.js +7 -1
- package/dist/service/cloudformation/template/condition/sim-cfn-condition-expression.d.ts +12 -3
- package/dist/service/cloudformation/template/condition/sim-cfn-condition-expression.js +29 -3
- package/dist/service/cloudformation/template/condition/sim-cfn-output-conditions.d.ts +28 -0
- package/dist/service/cloudformation/template/condition/sim-cfn-output-conditions.js +39 -0
- package/dist/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.d.ts +25 -1
- package/dist/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.js +43 -11
- package/dist/service/cloudformation/template/parse/fn/find-in-map/sim-cfn-fn-find-in-map-parser.d.ts +7 -0
- package/dist/service/cloudformation/template/parse/fn/find-in-map/sim-cfn-fn-find-in-map-parser.js +29 -3
- package/dist/service/cloudformation/template/sim-cfn-command-template.d.ts +40 -0
- package/dist/service/cloudformation/template/sim-cfn-command-template.js +45 -0
- package/dist/service/cloudformation/template/sim-cfn-template.d.ts +7 -0
- package/dist/service/cloudformation/template/sim-cfn-template.js +15 -1
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.d.ts +2 -0
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.js +49 -0
- package/dist/service/cloudfront/origin/custom/sim-cloudfront-custom-origin.js +1 -0
- package/dist/service/cloudfront/origin/s3/sim-cf-s3-origin-responses.js +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-provider-page.js +1 -1
- package/dist/service/cognito/user-pool/idp/sim-cognito-attribute-mapping.d.ts +5 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-attribute-mapping.js +17 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-presented-external-user.d.ts +5 -5
- package/dist/service/cognito/user-pool/idp/sim-cognito-presented-external-user.js +24 -8
- package/dist/service/dynamodb/cfn/sim-cfn-dynamodb-resource-factory.d.ts +5 -0
- package/dist/service/dynamodb/cfn/sim-cfn-dynamodb-resource-factory.js +15 -0
- package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-update-validator.d.ts +24 -0
- package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-update-validator.js +38 -0
- package/dist/service/dynamodb/command/query/sim-dynamodb-query-expressions.d.ts +11 -8
- package/dist/service/dynamodb/command/query/sim-dynamodb-query-expressions.js +20 -8
- package/dist/service/dynamodb/command/query/sim-dynamodb-query.js +2 -0
- package/dist/service/dynamodb/command/query/sim-dynamodb-unsimulated-query-input.js +0 -1
- package/dist/service/dynamodb/command/read/sim-dynamodb-read-answer.d.ts +14 -4
- package/dist/service/dynamodb/command/read/sim-dynamodb-read-answer.js +16 -4
- package/dist/service/dynamodb/command/read/sim-dynamodb-table-read.fixture.d.ts +17 -0
- package/dist/service/dynamodb/command/read/sim-dynamodb-table-read.fixture.js +39 -0
- package/dist/service/dynamodb/command/scan/sim-dynamodb-scan-expressions.d.ts +28 -0
- package/dist/service/dynamodb/command/scan/sim-dynamodb-scan-expressions.js +50 -0
- package/dist/service/dynamodb/command/scan/sim-dynamodb-scan.js +12 -5
- package/dist/service/dynamodb/command/scan/sim-dynamodb-unsimulated-scan-input.d.ts +3 -3
- package/dist/service/dynamodb/command/scan/sim-dynamodb-unsimulated-scan-input.js +3 -4
- package/dist/service/dynamodb/expression/filter/sim-dynamodb-filter-expression.d.ts +5 -16
- package/dist/service/dynamodb/expression/filter/sim-dynamodb-filter-expression.js +4 -21
- package/dist/service/dynamodb/expression/projection/sim-dynamodb-projection-expression.d.ts +15 -0
- package/dist/service/dynamodb/expression/projection/sim-dynamodb-projection-expression.js +18 -1
- package/dist/service/dynamodb/expression/projection/sim-dynamodb-projection.d.ts +13 -0
- package/dist/service/dynamodb/expression/projection/sim-dynamodb-projection.js +15 -0
- package/dist/service/dynamodb/table/sim-dynamodb-index-update.js +1 -2
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-properties.js +2 -0
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-rules.js +5 -3
- package/dist/service/lambda/cfn/url/sim-cfn-lambda-url-cors.d.ts +21 -0
- package/dist/service/lambda/cfn/url/sim-cfn-lambda-url-cors.js +37 -0
- package/dist/service/lambda/cfn/url/sim-cfn-lambda-url-creator.js +6 -0
- package/dist/service/lambda/command/create-function/create-function.handler.d.ts +3 -0
- package/dist/service/lambda/command/create-function/create-function.handler.js +5 -1
- package/dist/service/lambda/command/create-function-url-config/create-function-url-config.command.d.ts +2 -3
- package/dist/service/lambda/command/create-function-url-config/create-function-url-config.handler.js +1 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.d.ts +6 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js +10 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.js +2 -6
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.js +1 -0
- package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts +2 -0
- package/dist/service/lambda/command/function-url/function-url-cors-constraints.d.ts +25 -0
- package/dist/service/lambda/command/function-url/function-url-cors-constraints.js +49 -0
- package/dist/service/lambda/command/function-url/function-url-cors-input.d.ts +25 -0
- package/dist/service/lambda/command/function-url/function-url-cors-input.js +57 -0
- package/dist/service/lambda/command/function-url/function-url-input.d.ts +7 -0
- package/dist/service/lambda/command/function-url/function-url-input.js +9 -0
- package/dist/service/lambda/command/invoke/async/sim-lambda-async-invocation.js +10 -13
- package/dist/service/lambda/command/invoke/async/sim-lambda-async-outcome.js +2 -0
- package/dist/service/lambda/command/invoke/async/sim-lambda-handler-attempt.d.ts +13 -0
- package/dist/service/lambda/command/invoke/async/sim-lambda-handler-attempt.js +12 -0
- package/dist/service/lambda/command/update-function-url-config/update-function-url-config.command.d.ts +2 -0
- package/dist/service/lambda/command/update-function-url-config/update-function-url-config.handler.js +1 -0
- package/dist/service/lambda/destination/deliver/sim-lambda-destination-bus.js +1 -1
- package/dist/service/lambda/destination/deliver/sim-lambda-destination-function.js +8 -12
- package/dist/service/lambda/destination/deliver/sim-lambda-destination-queue.js +4 -3
- package/dist/service/lambda/destination/deliver/sim-lambda-destination-send.d.ts +2 -0
- package/dist/service/lambda/destination/deliver/sim-lambda-destination-topic.js +4 -3
- package/dist/service/lambda/destination/sim-aws-lambda-destinations.d.ts +4 -6
- package/dist/service/lambda/destination/sim-aws-lambda-destinations.js +6 -6
- package/dist/service/lambda/destination/sim-lambda-destination-targets.d.ts +3 -0
- package/dist/service/lambda/event-source/poll/kinesis/sim-lambda-kinesis-stream-delivery.js +4 -9
- package/dist/service/lambda/event-source/poll/sim-lambda-dynamodb-stream-delivery.js +4 -9
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-batch-outcome.d.ts +22 -3
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-batch-outcome.js +39 -9
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-batch-response.d.ts +7 -6
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-batch-response.js +14 -12
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-checkpoint.d.ts +9 -15
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-checkpoint.js +9 -16
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-progress.d.ts +10 -6
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-progress.js +22 -12
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-record-times.d.ts +23 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-record-times.js +18 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-retry-backoff.d.ts +12 -13
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-retry-backoff.js +24 -17
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-retry.d.ts +64 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-retry.js +86 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.d.ts +6 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.js +8 -1
- package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-rules.d.ts +6 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-rules.js +7 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.d.ts +11 -1
- package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.js +13 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-retry-limits.d.ts +39 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-retry-limits.js +46 -0
- package/dist/service/lambda/event-source/sim-lambda-stream-retry-limits.d.ts +56 -0
- package/dist/service/lambda/event-source/sim-lambda-stream-retry-limits.js +110 -0
- package/dist/service/lambda/event-source/stream/kinesis/sim-lambda-kinesis-event-source-arn.d.ts +5 -0
- package/dist/service/lambda/event-source/stream/kinesis/sim-lambda-kinesis-event-source-arn.js +7 -1
- package/dist/service/lambda/event-source/stream/kinesis/sim-lambda-kinesis-event-source-rules.d.ts +6 -0
- package/dist/service/lambda/event-source/stream/kinesis/sim-lambda-kinesis-event-source-rules.js +6 -0
- package/dist/service/lambda/event-source/stream/sim-lambda-dynamodb-stream-event-source-arn.d.ts +6 -1
- package/dist/service/lambda/event-source/stream/sim-lambda-dynamodb-stream-event-source-arn.js +8 -6
- package/dist/service/lambda/event-source/stream/sim-lambda-dynamodb-stream-event-source-rules.d.ts +10 -8
- package/dist/service/lambda/event-source/stream/sim-lambda-dynamodb-stream-event-source-rules.js +18 -1
- package/dist/service/lambda/function/code/sim-lambda-executable-code.d.ts +8 -2
- package/dist/service/lambda/function/code/sim-lambda-executable-code.js +2 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts +2 -11
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js +13 -39
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.d.ts +7 -0
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.js +13 -7
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-handler-lookup.d.ts +23 -0
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-handler-lookup.js +42 -0
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-output-stream.d.ts +12 -4
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-output-stream.js +15 -5
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts +7 -0
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js +6 -2
- package/dist/service/lambda/function/invoke/sim-lambda-invocation-deadline.d.ts +26 -0
- package/dist/service/lambda/function/invoke/sim-lambda-invocation-deadline.js +84 -0
- package/dist/service/lambda/function/invoke/sim-lambda-invocation.d.ts +44 -0
- package/dist/service/lambda/function/invoke/sim-lambda-invocation.js +44 -0
- package/dist/service/lambda/function/invoke/sim-lambda-invoke-context-builder.d.ts +6 -0
- package/dist/service/lambda/function/invoke/sim-lambda-invoke-context-builder.js +1 -2
- package/dist/service/lambda/function/invoke/sim-lambda-process-output.d.ts +6 -1
- package/dist/service/lambda/function/invoke/sim-lambda-process-output.js +19 -6
- package/dist/service/lambda/function/invoke/sim-lambda-timed-out.error.d.ts +15 -0
- package/dist/service/lambda/function/invoke/sim-lambda-timed-out.error.js +18 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-clear-timer.d.ts +12 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-clear-timer.js +28 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-clock-timer.d.ts +46 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-clock-timer.js +104 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-host-timers.d.ts +24 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-host-timers.js +27 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-invocation-timers.d.ts +43 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-invocation-timers.js +112 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-process-timers.d.ts +57 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-process-timers.js +79 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-timer-delay.d.ts +10 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-timer-delay.js +15 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-timer-global.d.ts +11 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-timer-global.js +24 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-timer-handle.d.ts +50 -0
- package/dist/service/lambda/function/invoke/timer/sim-lambda-timer-handle.js +43 -0
- package/dist/service/lambda/function/logging/sim-lambda-function-logging.d.ts +17 -0
- package/dist/service/lambda/function/logging/sim-lambda-function-logging.js +12 -1
- package/dist/service/lambda/function/logging/sim-lambda-output.d.ts +56 -0
- package/dist/service/lambda/function/logging/sim-lambda-output.js +62 -0
- package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.d.ts +8 -0
- package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.js +27 -1
- package/dist/service/lambda/function/sim-lambda-function.d.ts +1 -1
- package/dist/service/lambda/function/sim-lambda-function.js +11 -9
- package/dist/service/lambda/function/sim-lambda-function.type.d.ts +15 -0
- package/dist/service/lambda/function/url/sim-lambda-function-url-cors.d.ts +16 -0
- package/dist/service/lambda/function/url/sim-lambda-function-url-cors.factory.d.ts +22 -0
- package/dist/service/lambda/function/url/sim-lambda-function-url-cors.factory.js +17 -0
- package/dist/service/lambda/function/url/sim-lambda-function-url-cors.js +1 -0
- package/dist/service/lambda/function/url/sim-lambda-function-url-factory.d.ts +2 -0
- package/dist/service/lambda/function/url/sim-lambda-function-url-factory.js +2 -1
- package/dist/service/lambda/function/url/sim-lambda-function-url-store.d.ts +2 -0
- package/dist/service/lambda/function/url/sim-lambda-function-url.d.ts +16 -0
- package/dist/service/lambda/function/url/sim-lambda-function-url.js +16 -1
- package/dist/service/lambda/index.d.ts +1 -0
- package/dist/service/lambda/index.js +1 -0
- package/dist/service/lambda/serve/response/sim-lambda-url-cors-headers.d.ts +50 -0
- package/dist/service/lambda/serve/response/sim-lambda-url-cors-headers.js +96 -0
- package/dist/service/lambda/serve/sim-lambda-controller.d.ts +14 -0
- package/dist/service/lambda/serve/sim-lambda-controller.js +27 -0
- package/dist/service/lambda/sim-lambda-commands.d.ts +10 -0
- package/dist/service/lambda/sim-lambda-commands.js +11 -0
- package/dist/service/lambda/sim-lambda.d.ts +12 -0
- package/dist/service/lambda/sim-lambda.js +13 -0
- package/dist/service/s3/bucket/encryption/sim-s3-bucket-encryption.d.ts +67 -0
- package/dist/service/s3/bucket/encryption/sim-s3-bucket-encryption.js +69 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.d.ts +4 -31
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.js +7 -6
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-expiry.d.ts +5 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-expiry.js +8 -4
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-selection.d.ts +1 -14
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-selection.js +16 -8
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-subject.d.ts +41 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-subject.js +1 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-sweep.d.ts +14 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-sweep.js +32 -2
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-transition-instant.d.ts +33 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-transition-instant.js +48 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-transition.d.ts +16 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-transition.js +44 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-noncurrent-sweep.d.ts +8 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-noncurrent-sweep.js +27 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification-event.d.ts +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-event.js +5 -0
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-events.js +0 -3
- package/dist/service/s3/bucket/sim-s3-bucket-access.d.ts +3 -0
- package/dist/service/s3/bucket/sim-s3-bucket-access.js +6 -2
- package/dist/service/s3/bucket/sim-s3-bucket-configuration.d.ts +84 -0
- package/dist/service/s3/bucket/sim-s3-bucket-configuration.js +115 -0
- package/dist/service/s3/bucket/sim-s3-bucket-objects.d.ts +10 -0
- package/dist/service/s3/bucket/sim-s3-bucket-objects.js +18 -0
- package/dist/service/s3/bucket/sim-s3-bucket-properties.d.ts +41 -0
- package/dist/service/s3/bucket/sim-s3-bucket-properties.js +1 -0
- package/dist/service/s3/bucket/sim-s3-bucket.d.ts +11 -83
- package/dist/service/s3/bucket/sim-s3-bucket.js +14 -83
- package/dist/service/s3/bucket/sim-s3-public-read.fixture.d.ts +6 -0
- package/dist/service/s3/bucket/sim-s3-public-read.fixture.js +20 -6
- package/dist/service/s3/bucket/tagging/sim-s3-taggable-object.d.ts +58 -0
- package/dist/service/s3/bucket/tagging/sim-s3-taggable-object.js +73 -0
- package/dist/service/s3/bucket/versioning/sim-s3-object-version.d.ts +19 -1
- package/dist/service/s3/bucket/versioning/sim-s3-object-version.js +20 -0
- package/dist/service/s3/cfn/bucket/encryption/sim-cfn-s3-bucket-encryption.d.ts +21 -0
- package/dist/service/s3/cfn/bucket/encryption/sim-cfn-s3-bucket-encryption.js +44 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-configuration.js +6 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-fields.d.ts +5 -4
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-fields.js +12 -5
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-filter.d.ts +21 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-filter.js +30 -0
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-configurator.js +1 -0
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-declared-configurations.d.ts +14 -1
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-declared-configurations.js +41 -16
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-names.d.ts +3 -5
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-names.js +7 -10
- package/dist/service/s3/command/authorize/sim-s3-authorize-action.d.ts +6 -1
- package/dist/service/s3/command/authorize/sim-s3-authorize-action.js +5 -0
- package/dist/service/s3/command/copy-object/copy-object-builder.d.ts +10 -1
- package/dist/service/s3/command/copy-object/copy-object-builder.js +17 -1
- package/dist/service/s3/command/copy-object/copy-object.command.d.ts +11 -1
- package/dist/service/s3/command/copy-object/copy-object.handler.js +2 -1
- package/dist/service/s3/command/create-multipart-upload/create-multipart-upload.command.d.ts +5 -1
- package/dist/service/s3/command/create-multipart-upload/create-multipart-upload.handler.js +7 -0
- package/dist/service/s3/command/delete-bucket-encryption/delete-bucket-encryption.command.d.ts +19 -0
- package/dist/service/s3/command/delete-bucket-encryption/delete-bucket-encryption.command.js +1 -0
- package/dist/service/s3/command/delete-bucket-encryption/delete-bucket-encryption.handler.d.ts +30 -0
- package/dist/service/s3/command/delete-bucket-encryption/delete-bucket-encryption.handler.js +38 -0
- package/dist/service/s3/command/delete-object-tagging/delete-object-tagging.command.d.ts +23 -0
- package/dist/service/s3/command/delete-object-tagging/delete-object-tagging.command.js +1 -0
- package/dist/service/s3/command/delete-object-tagging/delete-object-tagging.handler.d.ts +22 -0
- package/dist/service/s3/command/delete-object-tagging/delete-object-tagging.handler.js +42 -0
- package/dist/service/s3/command/encryption/sim-s3-encryption-authorizer.d.ts +29 -0
- package/dist/service/s3/command/encryption/sim-s3-encryption-authorizer.js +49 -0
- package/dist/service/s3/command/encryption/sim-s3-encryption-commands.d.ts +22 -0
- package/dist/service/s3/command/encryption/sim-s3-encryption-commands.js +30 -0
- package/dist/service/s3/command/get-bucket-encryption/get-bucket-encryption.command.d.ts +24 -0
- package/dist/service/s3/command/get-bucket-encryption/get-bucket-encryption.command.js +1 -0
- package/dist/service/s3/command/get-bucket-encryption/get-bucket-encryption.handler.d.ts +31 -0
- package/dist/service/s3/command/get-bucket-encryption/get-bucket-encryption.handler.js +39 -0
- package/dist/service/s3/command/get-object/get-object-authorizer.d.ts +11 -8
- package/dist/service/s3/command/get-object/get-object-authorizer.js +26 -34
- package/dist/service/s3/command/get-object/get-object-loader.d.ts +7 -3
- package/dist/service/s3/command/get-object/get-object-loader.js +9 -4
- package/dist/service/s3/command/get-object/get-object.command.d.ts +2 -1
- package/dist/service/s3/command/get-object/get-object.handler.d.ts +4 -0
- package/dist/service/s3/command/get-object/get-object.handler.js +13 -7
- package/dist/service/s3/command/get-object-tagging/get-object-tagging.command.d.ts +29 -0
- package/dist/service/s3/command/get-object-tagging/get-object-tagging.command.js +1 -0
- package/dist/service/s3/command/get-object-tagging/get-object-tagging.handler.d.ts +21 -0
- package/dist/service/s3/command/get-object-tagging/get-object-tagging.handler.js +33 -0
- package/dist/service/s3/command/head-object/head-object-loader.js +2 -0
- package/dist/service/s3/command/head-object/head-object.command.d.ts +2 -1
- package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-rules-validation.js +18 -0
- package/dist/service/s3/command/list-multipart-uploads/list-multipart-uploads.handler.js +1 -2
- package/dist/service/s3/command/list-object-versions/list-object-versions-summaries.js +1 -2
- package/dist/service/s3/command/list-objects/list-objects-page-builder.d.ts +5 -0
- package/dist/service/s3/command/list-objects/list-objects-page-builder.js +11 -6
- package/dist/service/s3/command/list-objects/list-objects.command.d.ts +5 -1
- package/dist/service/s3/command/list-objects/list-objects.handler.js +5 -0
- package/dist/service/s3/command/list-objects-v2/list-objects-v2-page-builder.d.ts +6 -0
- package/dist/service/s3/command/list-objects-v2/list-objects-v2-page-builder.js +11 -5
- package/dist/service/s3/command/list-objects-v2/list-objects-v2.command.d.ts +5 -1
- package/dist/service/s3/command/list-objects-v2/list-objects-v2.handler.js +5 -0
- package/dist/service/s3/command/list-parts/list-parts.handler.js +3 -3
- package/dist/service/s3/command/multipart/sim-s3-multipart-access.js +1 -1
- package/dist/service/s3/command/put-bucket-encryption/put-bucket-encryption.command.d.ts +21 -0
- package/dist/service/s3/command/put-bucket-encryption/put-bucket-encryption.command.js +1 -0
- package/dist/service/s3/command/put-bucket-encryption/put-bucket-encryption.handler.d.ts +31 -0
- package/dist/service/s3/command/put-bucket-encryption/put-bucket-encryption.handler.js +41 -0
- package/dist/service/s3/command/put-object/put-object-builder.d.ts +5 -1
- package/dist/service/s3/command/put-object/put-object-builder.js +10 -1
- package/dist/service/s3/command/put-object/put-object.command.d.ts +5 -1
- package/dist/service/s3/command/put-object/put-object.handler.js +2 -1
- package/dist/service/s3/command/put-object-tagging/put-object-tagging.command.d.ts +37 -0
- package/dist/service/s3/command/put-object-tagging/put-object-tagging.command.js +1 -0
- package/dist/service/s3/command/put-object-tagging/put-object-tagging.handler.d.ts +22 -0
- package/dist/service/s3/command/put-object-tagging/put-object-tagging.handler.js +46 -0
- package/dist/service/s3/command/sim-s3-command.types.d.ts +6 -0
- package/dist/service/s3/command/tagging/sim-s3-object-tagging-access.d.ts +61 -0
- package/dist/service/s3/command/tagging/sim-s3-object-tagging-access.js +49 -0
- package/dist/service/s3/command/tagging/sim-s3-object-tagging-authorizer.d.ts +30 -0
- package/dist/service/s3/command/tagging/sim-s3-object-tagging-authorizer.js +27 -0
- package/dist/service/s3/command/tagging/sim-s3-object-tagging-commands.d.ts +26 -0
- package/dist/service/s3/command/tagging/sim-s3-object-tagging-commands.js +34 -0
- package/dist/service/s3/error/sim-s3-upload.error.d.ts +41 -0
- package/dist/service/s3/error/sim-s3-upload.error.js +47 -0
- package/dist/service/s3/error/sim-s3.error.d.ts +22 -34
- package/dist/service/s3/error/sim-s3.error.js +26 -40
- package/dist/service/s3/mount/sim-s3-mount.type.d.ts +10 -0
- package/dist/service/s3/notification/event/sim-s3-event-records.d.ts +3 -2
- package/dist/service/s3/notification/event/sim-s3-event-records.js +5 -3
- package/dist/service/s3/notification/event/sim-s3-object-event-builder.d.ts +33 -8
- package/dist/service/s3/notification/event/sim-s3-object-event-builder.js +23 -9
- package/dist/service/s3/notification/sim-s3-object-notifier.d.ts +5 -1
- package/dist/service/s3/notification/sim-s3-object-notifier.js +6 -0
- package/dist/service/s3/object/s3-key-encoding.d.ts +12 -0
- package/dist/service/s3/object/s3-key-encoding.js +14 -0
- package/dist/service/s3/object/s3-listing-encoding.d.ts +42 -0
- package/dist/service/s3/object/s3-listing-encoding.js +75 -0
- package/dist/service/s3/object/s3-object-response-headers.d.ts +40 -0
- package/dist/service/s3/object/s3-object-response-headers.js +49 -2
- package/dist/service/s3/object/s3-object-storage-report.d.ts +19 -0
- package/dist/service/s3/object/s3-object-storage-report.js +18 -0
- package/dist/service/s3/object/s3-object-summary.d.ts +2 -10
- package/dist/service/s3/object/s3-object-summary.js +1 -10
- package/dist/service/s3/object/s3-object-tags.d.ts +61 -0
- package/dist/service/s3/object/s3-object-tags.js +77 -0
- package/dist/service/s3/object/s3-object.d.ts +49 -0
- package/dist/service/s3/object/s3-object.js +52 -1
- package/dist/service/s3/object/s3-server-side-encryption.d.ts +30 -0
- package/dist/service/s3/object/s3-server-side-encryption.js +42 -0
- package/dist/service/s3/object/s3-storage-class.d.ts +45 -0
- package/dist/service/s3/object/s3-storage-class.js +67 -0
- package/dist/service/s3/object/s3-write-metadata.d.ts +17 -3
- package/dist/service/s3/object/s3-write-metadata.js +43 -0
- package/dist/service/s3/object/s3-write-storage.d.ts +27 -0
- package/dist/service/s3/object/s3-write-storage.js +21 -0
- package/dist/service/s3/object/s3-write-tagging.d.ts +24 -0
- package/dist/service/s3/object/s3-write-tagging.js +19 -0
- package/dist/service/s3/sdk/sim-s3-sdk-bucket-routes.js +12 -0
- package/dist/service/s3/sdk/sim-s3-sdk-command-router.js +2 -0
- package/dist/service/s3/sdk/sim-s3-sdk-object-tagging-routes.d.ts +9 -0
- package/dist/service/s3/sdk/sim-s3-sdk-object-tagging-routes.js +23 -0
- package/dist/service/s3/serve/api/sim-s3-api-bucket-routes.js +22 -0
- package/dist/service/s3/serve/api/sim-s3-api-configuration-output.d.ts +4 -0
- package/dist/service/s3/serve/api/sim-s3-api-configuration-output.js +10 -0
- package/dist/service/s3/serve/api/sim-s3-api-encryption-read.d.ts +7 -0
- package/dist/service/s3/serve/api/sim-s3-api-encryption-read.js +30 -0
- package/dist/service/s3/serve/api/sim-s3-api-head-output.d.ts +4 -2
- package/dist/service/s3/serve/api/sim-s3-api-head-output.js +8 -2
- package/dist/service/s3/serve/api/sim-s3-api-input.d.ts +0 -6
- package/dist/service/s3/serve/api/sim-s3-api-input.js +2 -13
- package/dist/service/s3/serve/api/sim-s3-api-listing.d.ts +5 -0
- package/dist/service/s3/serve/api/sim-s3-api-listing.js +5 -0
- package/dist/service/s3/serve/api/sim-s3-api-object-input.d.ts +16 -0
- package/dist/service/s3/serve/api/sim-s3-api-object-input.js +34 -7
- package/dist/service/s3/serve/api/sim-s3-api-object-output.d.ts +18 -1
- package/dist/service/s3/serve/api/sim-s3-api-object-output.js +21 -2
- package/dist/service/s3/serve/api/sim-s3-api-object-routes.js +22 -1
- package/dist/service/s3/serve/api/sim-s3-api-output.d.ts +5 -1
- package/dist/service/s3/serve/api/sim-s3-api-output.js +16 -5
- package/dist/service/s3/serve/api/sim-s3-api-request.d.ts +6 -5
- package/dist/service/s3/serve/api/sim-s3-api-request.js +55 -11
- package/dist/service/s3/serve/api/sim-s3-api-routes.js +2 -2
- package/dist/service/s3/serve/api/sim-s3-api-tagging-read.d.ts +9 -0
- package/dist/service/s3/serve/api/sim-s3-api-tagging-read.js +14 -0
- package/dist/service/s3/serve/api/sim-s3-api.d.ts +7 -1
- package/dist/service/s3/serve/api/sim-s3-api.js +7 -1
- package/dist/service/s3/serve/sim-s3-rest-controller.d.ts +1 -5
- package/dist/service/s3/serve/sim-s3-rest-controller.js +3 -17
- package/dist/service/s3/serve/sim-s3-rest-object-reader.d.ts +3 -0
- package/dist/service/s3/serve/sim-s3-rest-object-reader.js +8 -1
- package/dist/service/s3/serve/sim-s3-rest-upload.d.ts +20 -0
- package/dist/service/s3/serve/sim-s3-rest-upload.js +30 -0
- package/dist/service/s3/serve/website/sim-s3-website-object-loader.js +1 -0
- package/dist/service/s3/serve/website/sim-s3-website-object.d.ts +2 -0
- package/dist/service/s3/serve/website/sim-s3-website-object.js +3 -0
- package/dist/service/s3/sim-s3-commands.d.ts +4 -0
- package/dist/service/s3/sim-s3-commands.js +6 -0
- package/dist/service/s3/sim-s3-operations.d.ts +11 -4
- package/dist/service/s3/sim-s3-operations.js +17 -4
- package/dist/service/s3/sim-s3-tagging-operations.d.ts +21 -0
- package/dist/service/s3/sim-s3-tagging-operations.js +25 -0
- package/dist/service/s3/sim-s3.d.ts +12 -0
- package/dist/service/s3/sim-s3.js +13 -0
- package/dist/service/s3/storage/filesystem/s3-filesystem-deleting-storage.d.ts +34 -0
- package/dist/service/s3/storage/filesystem/s3-filesystem-deleting-storage.js +34 -0
- package/dist/service/s3/storage/filesystem/s3-filesystem-deletion.d.ts +9 -0
- package/dist/service/s3/storage/filesystem/s3-filesystem-deletion.js +24 -0
- package/dist/service/s3/storage/filesystem/s3-filesystem-storage.d.ts +5 -4
- package/dist/service/s3/storage/filesystem/s3-filesystem-storage.js +5 -3
- package/dist/service/s3/upload/sim-s3-completed-upload.js +5 -1
- package/dist/service/s3/upload/sim-s3-multipart-upload.d.ts +18 -0
- package/dist/service/s3/upload/sim-s3-multipart-upload.js +8 -0
- package/dist/service/s3/upload/sim-s3-multipart-uploads.d.ts +6 -0
- package/dist/service/s3/upload/sim-s3-multipart-uploads.js +5 -0
- package/dist/util/background/background-clock-waits.d.ts +52 -0
- package/dist/util/background/background-clock-waits.js +76 -0
- package/dist/util/background/background-jitter.js +1 -0
- package/dist/util/background/background-pending-tasks.d.ts +55 -0
- package/dist/util/background/background-pending-tasks.js +117 -0
- package/dist/util/background/background-settled-tasks.d.ts +4 -1
- package/dist/util/background/background-settled-tasks.js +4 -1
- package/dist/util/background/background.d.ts +43 -0
- package/dist/util/background/background.js +27 -19
- package/dist/util/background/non-deterministic-background.d.ts +12 -0
- package/dist/util/background/non-deterministic-background.js +24 -20
- package/dist/util/clock/sim-clock-control.js +23 -2
- package/docs/services/apigateway/README.md +3 -1
- package/docs/services/athena/README.md +126 -3
- package/docs/services/cloudformation/README.md +775 -65
- package/docs/services/cognito/README.md +5 -0
- package/docs/services/dynamodb/README.md +86 -11
- package/docs/services/lambda/README.md +603 -39
- package/docs/services/s3/README.md +688 -57
- package/package.json +8 -2
|
@@ -418,6 +418,65 @@ for (const object of objectContentItems) {
|
|
|
418
418
|
The marker is exclusive and lexicographic. A listing resumes after the key it names whether or not
|
|
419
419
|
the Bucket still holds it.
|
|
420
420
|
|
|
421
|
+
### Asking for encoded keys
|
|
422
|
+
|
|
423
|
+
An Object key can hold characters an XML document cannot carry, and a listing writes its keys into
|
|
424
|
+
XML. `EncodingType: "url"` asks for them encoded. Simulated S3 encodes every `Key`, the `Prefix` and
|
|
425
|
+
`Delimiter` the request named, each prefix in `CommonPrefixes`, and the marker or `StartAfter` key
|
|
426
|
+
the response carries, as real S3 encodes them. The listing reports `EncodingType` back.
|
|
427
|
+
|
|
428
|
+
```typescript sim-s3-list-objects-encoded-keys
|
|
429
|
+
/**
|
|
430
|
+
* Listing a simulated S3 Bucket with its keys encoded.
|
|
431
|
+
*/
|
|
432
|
+
|
|
433
|
+
import {
|
|
434
|
+
CreateBucketCommand,
|
|
435
|
+
ListObjectsV2Command,
|
|
436
|
+
PutObjectCommand,
|
|
437
|
+
} from "@aws-sdk/client-s3";
|
|
438
|
+
import { SimAws } from "@kensio/yulin";
|
|
439
|
+
|
|
440
|
+
const simS3 = new SimAws().s3();
|
|
441
|
+
|
|
442
|
+
await simS3.createBucket(new CreateBucketCommand({ Bucket: "uploads" }));
|
|
443
|
+
|
|
444
|
+
await simS3.putObject(
|
|
445
|
+
new PutObjectCommand({
|
|
446
|
+
Bucket: "uploads",
|
|
447
|
+
Key: "invoices/March 2027 & April.pdf",
|
|
448
|
+
Body: "invoice bytes",
|
|
449
|
+
}),
|
|
450
|
+
);
|
|
451
|
+
|
|
452
|
+
const listed = await simS3.listObjectsV2(
|
|
453
|
+
new ListObjectsV2Command({ Bucket: "uploads", EncodingType: "url" }),
|
|
454
|
+
);
|
|
455
|
+
|
|
456
|
+
console.log(listed.EncodingType); // url
|
|
457
|
+
|
|
458
|
+
const listedObjects = listed.Contents ?? [];
|
|
459
|
+
|
|
460
|
+
for (const listedObject of listedObjects) {
|
|
461
|
+
const encodedKey = listedObject.Key ?? "";
|
|
462
|
+
|
|
463
|
+
console.log(encodedKey); // invoices/March+2027+%26+April.pdf
|
|
464
|
+
|
|
465
|
+
// S3 form-encodes a key, and a plus sign in one stands for a space.
|
|
466
|
+
console.log(decodeURIComponent(encodedKey.replaceAll("+", " ")));
|
|
467
|
+
}
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
The encoding is the one an event notification record carries a key in. A space becomes a plus sign,
|
|
471
|
+
and the slashes of a key prefix are left as they are. Continuation tokens are left alone in either
|
|
472
|
+
version of the operation, being opaque already.
|
|
473
|
+
|
|
474
|
+
A listing that names no `EncodingType` answers with the keys as they were written, and says nothing
|
|
475
|
+
about an encoding. Any other value is refused with `InvalidArgument`.
|
|
476
|
+
|
|
477
|
+
The `encoding-type` query parameter carries this over a
|
|
478
|
+
[served endpoint](#serve-simulated-s3-on-localhost), and the SDK sets it from `EncodingType`.
|
|
479
|
+
|
|
421
480
|
## Object ETags
|
|
422
481
|
|
|
423
482
|
Every Object has an ETag, the MD5 of its body in hex and quoted, as real S3 gives it for a
|
|
@@ -779,8 +838,7 @@ See [Serve simulated S3 on localhost](#serve-simulated-s3-on-localhost) for sett
|
|
|
779
838
|
- `CopySourceIfMatch`, `CopySourceIfNoneMatch`, `CopySourceIfModifiedSince` and
|
|
780
839
|
`CopySourceIfUnmodifiedSince` are ignored. A conditional copy happens whatever the condition
|
|
781
840
|
says.
|
|
782
|
-
- `
|
|
783
|
-
S3 models none of what they describe.
|
|
841
|
+
- `ACL` is ignored. Sim S3 models no Object ACL.
|
|
784
842
|
- A `versionId` in `CopySource` is refused with `NotImplemented`.
|
|
785
843
|
- A copy of an Object that was uploaded in parts gets a plain ETag rather than the multipart form.
|
|
786
844
|
Real S3 does the same for a copy under five gigabytes, because it rewrites the bytes as one
|
|
@@ -1290,6 +1348,11 @@ The event types a configuration can name are `s3:ObjectCreated:*`, `s3:ObjectCre
|
|
|
1290
1348
|
`s3:ObjectRemoved:*` and `s3:ObjectRemoved:Delete`. Any other S3 event type is refused by name rather
|
|
1291
1349
|
than stored and never raised.
|
|
1292
1350
|
|
|
1351
|
+
A CDK [`BucketDeployment`](https://yulinsim.dev/services/cloudformation/#cdk-s3-bucketdeployment) raises
|
|
1352
|
+
both. It copies its files in one Object at a time, so each file the deployment writes raises
|
|
1353
|
+
`ObjectCreated:Put`, and each Object a pruning deployment removes raises `ObjectRemoved:Delete`. The
|
|
1354
|
+
sync it stands in for raises the same two in AWS.
|
|
1355
|
+
|
|
1293
1356
|
A configuration can filter on an object key prefix, a suffix, or both. Two configurations that share
|
|
1294
1357
|
an event type and whose filters could both match the same key are refused with `InvalidArgument`, as
|
|
1295
1358
|
real S3 refuses them. Overlapping prefixes are fine when the suffixes do not overlap, so one function
|
|
@@ -1980,12 +2043,13 @@ writes fall outside it. Without that, the simulation stops after a thousand deli
|
|
|
1980
2043
|
- A destination goes where the group it was declared in says, and its ARN has no say. A queue ARN
|
|
1981
2044
|
under `LambdaFunctionConfigurations` is refused for failing to be a function ARN, and never
|
|
1982
2045
|
delivered to as a queue.
|
|
1983
|
-
-
|
|
1984
|
-
`s3:ObjectCreated:CompleteMultipartUpload
|
|
1985
|
-
`
|
|
1986
|
-
`
|
|
1987
|
-
`ReducedRedundancyLostObject` are refused by name.
|
|
1988
|
-
creations
|
|
2046
|
+
- Six event types are raised: `s3:ObjectCreated:Put`, `s3:ObjectCreated:Copy`,
|
|
2047
|
+
`s3:ObjectCreated:CompleteMultipartUpload`, `s3:ObjectRemoved:Delete`,
|
|
2048
|
+
`s3:ObjectTagging:Put` and `s3:ObjectTagging:Delete`. `Post`, `DeleteMarkerCreated`, the
|
|
2049
|
+
`ObjectRestore:*`, `Replication:*` and `LifecycleExpiration:*` families, `LifecycleTransition`,
|
|
2050
|
+
`IntelligentTiering`, `ObjectAcl:Put` and `ReducedRedundancyLostObject` are refused by name.
|
|
2051
|
+
`s3:ObjectCreated:*` expands to the three creations, `s3:ObjectRemoved:*` to the one removal and
|
|
2052
|
+
`s3:ObjectTagging:*` to the two tagging events.
|
|
1989
2053
|
- `userIdentity.principalId` carries the caller's ARN rather than the `AIDA...` unique id real S3
|
|
1990
2054
|
puts there. Simulated IAM has no unique-id namespace to draw one from, and an ARN is what a test
|
|
1991
2055
|
would assert on. `requestParameters.sourceIPAddress` is the loopback address, because the request
|
|
@@ -2008,9 +2072,11 @@ writes fall outside it. Without that, the simulation stops after a thousand deli
|
|
|
2008
2072
|
same way.
|
|
2009
2073
|
- The KMS key policy statement CDK's `SqsDestination` writes for an encrypted queue is ignored.
|
|
2010
2074
|
Queue encryption is left out.
|
|
2011
|
-
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2075
|
+
- `mountBucketFilesystem(...)` replaces the storage with the directory, and a file written there by
|
|
2076
|
+
something other than S3 raises nothing. The watcher reports that the directory changed without
|
|
2077
|
+
naming the file, and comparing the whole key set on every reload is a larger change than this
|
|
2078
|
+
earns. A delete through S3 raises `ObjectRemoved:Delete` on a mount that
|
|
2079
|
+
[allows deletion](#deleting-the-files-under-a-mount).
|
|
2014
2080
|
- A topic destination publishes with no message attributes, since real S3 publishes none. The only
|
|
2015
2081
|
thing on the message besides the event document is the `Amazon S3 Notification` subject.
|
|
2016
2082
|
- `s3:TestEvent` is left out. Real S3 puts one on a queue or topic when a configuration naming it is
|
|
@@ -2172,6 +2238,111 @@ matching S3's idempotent behaviour.
|
|
|
2172
2238
|
A Bucket policy granting `Principal: "*"` is refused by default. See
|
|
2173
2239
|
[Block Public Access](#block-public-access) below.
|
|
2174
2240
|
|
|
2241
|
+
### Missing keys and `s3:ListBucket`
|
|
2242
|
+
|
|
2243
|
+
What S3 answers for a missing Object depends on a second permission. A caller holding
|
|
2244
|
+
`s3:GetObject` alone is answered `403 AccessDenied` for a key the Bucket does not hold, the same
|
|
2245
|
+
answer it gets for a key it may not read. `s3:ListBucket` on the Bucket ARN is what buys
|
|
2246
|
+
`404 NoSuchKey`.
|
|
2247
|
+
|
|
2248
|
+
Which keys a Bucket holds is what a listing tells you, and real S3 admits the absence only to a
|
|
2249
|
+
caller that may list. A test written against a simulator that always answered `NoSuchKey` would
|
|
2250
|
+
handle the absence on a path the deployed code never reaches.
|
|
2251
|
+
|
|
2252
|
+
```typescript sim-s3-missing-key-permission
|
|
2253
|
+
/**
|
|
2254
|
+
* What simulated S3 answers for an Object that is not there.
|
|
2255
|
+
*/
|
|
2256
|
+
|
|
2257
|
+
import { CreateRoleCommand, PutRolePolicyCommand } from "@aws-sdk/client-iam";
|
|
2258
|
+
import { CreateBucketCommand, GetObjectCommand } from "@aws-sdk/client-s3";
|
|
2259
|
+
import { SimAws } from "@kensio/yulin";
|
|
2260
|
+
|
|
2261
|
+
const simAws = new SimAws();
|
|
2262
|
+
const simIam = simAws.iam();
|
|
2263
|
+
const simS3 = simAws.s3();
|
|
2264
|
+
|
|
2265
|
+
await simS3.createBucket(new CreateBucketCommand({ Bucket: "reports" }));
|
|
2266
|
+
|
|
2267
|
+
const readerCreation = await simIam.createRole(
|
|
2268
|
+
new CreateRoleCommand({
|
|
2269
|
+
RoleName: "ReportReader",
|
|
2270
|
+
AssumeRolePolicyDocument: JSON.stringify({
|
|
2271
|
+
Version: "2012-10-17",
|
|
2272
|
+
Statement: {
|
|
2273
|
+
Effect: "Allow",
|
|
2274
|
+
Principal: { Service: "lambda.amazonaws.com" },
|
|
2275
|
+
Action: "sts:AssumeRole",
|
|
2276
|
+
},
|
|
2277
|
+
}),
|
|
2278
|
+
}),
|
|
2279
|
+
);
|
|
2280
|
+
|
|
2281
|
+
await simIam.putRolePolicy(
|
|
2282
|
+
new PutRolePolicyCommand({
|
|
2283
|
+
RoleName: "ReportReader",
|
|
2284
|
+
PolicyName: "ReadReports",
|
|
2285
|
+
PolicyDocument: JSON.stringify({
|
|
2286
|
+
Version: "2012-10-17",
|
|
2287
|
+
Statement: {
|
|
2288
|
+
Effect: "Allow",
|
|
2289
|
+
Action: "s3:GetObject",
|
|
2290
|
+
Resource: "arn:aws:s3:::reports/*",
|
|
2291
|
+
},
|
|
2292
|
+
}),
|
|
2293
|
+
}),
|
|
2294
|
+
);
|
|
2295
|
+
|
|
2296
|
+
const asReader = {
|
|
2297
|
+
caller: { kind: "arn", arn: readerCreation.Role.Arn },
|
|
2298
|
+
} as const;
|
|
2299
|
+
|
|
2300
|
+
try {
|
|
2301
|
+
await simS3.getObject(
|
|
2302
|
+
new GetObjectCommand({ Bucket: "reports", Key: "q4/report.txt" }),
|
|
2303
|
+
asReader,
|
|
2304
|
+
);
|
|
2305
|
+
} catch (error) {
|
|
2306
|
+
// AccessDenied, with a 403 status. This caller may not list the Bucket, and
|
|
2307
|
+
// S3 will not tell it whether the key is there.
|
|
2308
|
+
console.error("Read refused", error);
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
await simIam.putRolePolicy(
|
|
2312
|
+
new PutRolePolicyCommand({
|
|
2313
|
+
RoleName: "ReportReader",
|
|
2314
|
+
PolicyName: "ListReports",
|
|
2315
|
+
PolicyDocument: JSON.stringify({
|
|
2316
|
+
Version: "2012-10-17",
|
|
2317
|
+
Statement: {
|
|
2318
|
+
Effect: "Allow",
|
|
2319
|
+
Action: "s3:ListBucket",
|
|
2320
|
+
Resource: "arn:aws:s3:::reports",
|
|
2321
|
+
},
|
|
2322
|
+
}),
|
|
2323
|
+
}),
|
|
2324
|
+
);
|
|
2325
|
+
|
|
2326
|
+
try {
|
|
2327
|
+
await simS3.getObject(
|
|
2328
|
+
new GetObjectCommand({ Bucket: "reports", Key: "q4/report.txt" }),
|
|
2329
|
+
asReader,
|
|
2330
|
+
);
|
|
2331
|
+
} catch (error) {
|
|
2332
|
+
// NoSuchKey, with a 404 status.
|
|
2333
|
+
console.error("Object missing", error);
|
|
2334
|
+
}
|
|
2335
|
+
```
|
|
2336
|
+
|
|
2337
|
+
An Object that is there is served on `s3:GetObject` alone. The listing permission only decides what
|
|
2338
|
+
a caller is told about a key the Bucket does not hold.
|
|
2339
|
+
|
|
2340
|
+
Everything that reads through GetObject follows the same rule, including the served S3 endpoint, the
|
|
2341
|
+
static website endpoint and a CloudFront S3 Origin. A site whose Bucket policy grants only
|
|
2342
|
+
`s3:GetObject` answers 403 for a page it does not hold, and serves its custom error document with
|
|
2343
|
+
that status. Adding `s3:ListBucket` on the Bucket ARN gives it the 404 an error document is usually
|
|
2344
|
+
written for.
|
|
2345
|
+
|
|
2175
2346
|
### Where a request came from
|
|
2176
2347
|
|
|
2177
2348
|
A request can say what it is being made for, and a simulated service supplies that when it reaches a
|
|
@@ -2256,12 +2427,238 @@ Bucket ACLs and Object ownership settings are left out, and stay that way by cho
|
|
|
2256
2427
|
defaults to Bucket owner enforced on new Buckets, which disables ACLs, and AWS recommends keeping
|
|
2257
2428
|
them disabled in favour of policies.
|
|
2258
2429
|
|
|
2430
|
+
## Storage classes
|
|
2431
|
+
|
|
2432
|
+
Every Object is in a storage class. A write names one and the Object stays there until a lifecycle
|
|
2433
|
+
rule moves it. `PutObject`, `CopyObject` and `CreateMultipartUpload` all take a `StorageClass`, and
|
|
2434
|
+
both list operations, `GetObject` and `HeadObject` report where the Object ended up.
|
|
2435
|
+
|
|
2436
|
+
```typescript sim-s3-storage-class
|
|
2437
|
+
/**
|
|
2438
|
+
* Writing a simulated S3 Object into an archival storage class.
|
|
2439
|
+
*/
|
|
2440
|
+
|
|
2441
|
+
import {
|
|
2442
|
+
CreateBucketCommand,
|
|
2443
|
+
HeadObjectCommand,
|
|
2444
|
+
ListObjectsV2Command,
|
|
2445
|
+
PutObjectCommand,
|
|
2446
|
+
} from "@aws-sdk/client-s3";
|
|
2447
|
+
import { SimAws } from "@kensio/yulin";
|
|
2448
|
+
|
|
2449
|
+
const simAws = new SimAws();
|
|
2450
|
+
const simS3 = simAws.region("eu-west-2").s3();
|
|
2451
|
+
|
|
2452
|
+
await simS3.createBucket(new CreateBucketCommand({ Bucket: "archive" }));
|
|
2453
|
+
|
|
2454
|
+
await simS3.putObject(
|
|
2455
|
+
new PutObjectCommand({
|
|
2456
|
+
Bucket: "archive",
|
|
2457
|
+
Key: "ledgers/2026.csv",
|
|
2458
|
+
Body: "a,b",
|
|
2459
|
+
StorageClass: "GLACIER",
|
|
2460
|
+
}),
|
|
2461
|
+
);
|
|
2462
|
+
|
|
2463
|
+
const listing = await simS3.listObjectsV2(
|
|
2464
|
+
new ListObjectsV2Command({ Bucket: "archive" }),
|
|
2465
|
+
);
|
|
2466
|
+
const head = await simS3.headObject(
|
|
2467
|
+
new HeadObjectCommand({ Bucket: "archive", Key: "ledgers/2026.csv" }),
|
|
2468
|
+
);
|
|
2469
|
+
|
|
2470
|
+
// GLACIER, from the listing and from the Object itself.
|
|
2471
|
+
console.log(listing.Contents?.[0]?.StorageClass, head.StorageClass);
|
|
2472
|
+
```
|
|
2473
|
+
|
|
2474
|
+
A write naming a class S3 has no such class for is refused with `InvalidStorageClass`, before
|
|
2475
|
+
anything is stored. The classes taken are `STANDARD`, `REDUCED_REDUNDANCY`, `STANDARD_IA`,
|
|
2476
|
+
`ONEZONE_IA`, `INTELLIGENT_TIERING`, `GLACIER_IR`, `GLACIER`, `DEEP_ARCHIVE`, `EXPRESS_ONEZONE`,
|
|
2477
|
+
`OUTPOSTS` and `SNOW`.
|
|
2478
|
+
|
|
2479
|
+
A listing always reports a class, and a read reports one only for an Object outside `STANDARD`. That
|
|
2480
|
+
is how real S3 answers, and it is why `GetObject.StorageClass` is undefined for most Objects. A copy
|
|
2481
|
+
is stored in the class the copy names rather than the source's, and an upload in parts takes its
|
|
2482
|
+
class at `CreateMultipartUpload` rather than at the completion.
|
|
2483
|
+
|
|
2484
|
+
Where the Object is changes nothing about reading it. Real S3 refuses a read of an archived Object
|
|
2485
|
+
until `RestoreObject` has brought it back, and sim S3 serves every Object whatever class it is in.
|
|
2486
|
+
See [Limitations](#limitations).
|
|
2487
|
+
|
|
2488
|
+
## Object tags
|
|
2489
|
+
|
|
2490
|
+
An Object carries up to ten tags. `PutObjectTaggingCommand`, `GetObjectTaggingCommand` and
|
|
2491
|
+
`DeleteObjectTaggingCommand` read and replace the whole set, and `PutObject`, `CopyObject` and
|
|
2492
|
+
`CreateMultipartUpload` take one on the write itself, as the `department=finance&retention=long`
|
|
2493
|
+
query string real S3 carries it in.
|
|
2494
|
+
|
|
2495
|
+
```typescript sim-s3-object-tagging
|
|
2496
|
+
/**
|
|
2497
|
+
* Tagging a simulated S3 Object and reading the tags back.
|
|
2498
|
+
*/
|
|
2499
|
+
|
|
2500
|
+
import {
|
|
2501
|
+
CreateBucketCommand,
|
|
2502
|
+
GetObjectTaggingCommand,
|
|
2503
|
+
PutObjectCommand,
|
|
2504
|
+
PutObjectTaggingCommand,
|
|
2505
|
+
} from "@aws-sdk/client-s3";
|
|
2506
|
+
import { SimAws } from "@kensio/yulin";
|
|
2507
|
+
|
|
2508
|
+
const simAws = new SimAws();
|
|
2509
|
+
const simS3 = simAws.region("eu-west-2").s3();
|
|
2510
|
+
|
|
2511
|
+
await simS3.createBucket(new CreateBucketCommand({ Bucket: "reports" }));
|
|
2512
|
+
|
|
2513
|
+
// A write can carry its own tags, as the query string S3 takes them in.
|
|
2514
|
+
await simS3.putObject(
|
|
2515
|
+
new PutObjectCommand({
|
|
2516
|
+
Bucket: "reports",
|
|
2517
|
+
Key: "quarterly.csv",
|
|
2518
|
+
Body: "period,total",
|
|
2519
|
+
Tagging: "department=finance&retention=long",
|
|
2520
|
+
}),
|
|
2521
|
+
);
|
|
2522
|
+
|
|
2523
|
+
// A tagging request replaces the whole set.
|
|
2524
|
+
await simS3.putObjectTagging(
|
|
2525
|
+
new PutObjectTaggingCommand({
|
|
2526
|
+
Bucket: "reports",
|
|
2527
|
+
Key: "quarterly.csv",
|
|
2528
|
+
Tagging: { TagSet: [{ Key: "department", Value: "legal" }] },
|
|
2529
|
+
}),
|
|
2530
|
+
);
|
|
2531
|
+
|
|
2532
|
+
const read = await simS3.getObjectTagging(
|
|
2533
|
+
new GetObjectTaggingCommand({ Bucket: "reports", Key: "quarterly.csv" }),
|
|
2534
|
+
);
|
|
2535
|
+
|
|
2536
|
+
// [ { Key: "department", Value: "legal" } ]
|
|
2537
|
+
console.log(read.TagSet);
|
|
2538
|
+
```
|
|
2539
|
+
|
|
2540
|
+
A tag set is put whole, as real S3 puts one. The request above leaves the Object carrying
|
|
2541
|
+
`department=legal` and nothing else. An Object nobody has tagged reads back with an empty `TagSet`.
|
|
2542
|
+
Having no tags is a different thing from having no Object, and only the second is `NoSuchKey`.
|
|
2543
|
+
|
|
2544
|
+
A set of more than ten tags is refused with `InvalidTag`, and so is one stating a key twice. Both
|
|
2545
|
+
are checked before anything is written, leaving an Object refused eleven tags carrying none of them.
|
|
2546
|
+
|
|
2547
|
+
A copy carries the source Object's tags. `TaggingDirective: REPLACE` puts the request's own
|
|
2548
|
+
`Tagging` on the copy and drops the source's.
|
|
2549
|
+
|
|
2550
|
+
On a Bucket keeping versions, a tag set belongs to the version it was put on. Writing a new version
|
|
2551
|
+
leaves the one before it carrying what that version was written with, and a tagging request naming a
|
|
2552
|
+
`VersionId` reaches that version alone.
|
|
2553
|
+
|
|
2554
|
+
Tagging an Object raises `s3:ObjectTagging:Put`, and removing its tags raises
|
|
2555
|
+
`s3:ObjectTagging:Delete`. See [Event notifications](#event-notifications). A lifecycle rule
|
|
2556
|
+
filtering on a tag selects the Objects carrying it. See [What a rule selects](#what-a-rule-selects).
|
|
2557
|
+
|
|
2558
|
+
Each of the three operations is granted by a permission of its own, `s3:GetObjectTagging`,
|
|
2559
|
+
`s3:PutObjectTagging` and `s3:DeleteObjectTagging`. `s3:PutObject` grants none of them. All three are
|
|
2560
|
+
served over the S3 REST endpoint under the `?tagging` sub-resource, so the CLI reaches the same
|
|
2561
|
+
handlers an SDK caller does.
|
|
2562
|
+
|
|
2563
|
+
### Limitations
|
|
2564
|
+
|
|
2565
|
+
- Bucket tags are inert. `Tags` on an `AWS::S3::Bucket` is recorded and never read.
|
|
2566
|
+
- The `s3:ExistingObjectTag` and `s3:RequestObjectTag` IAM condition keys are left out. A Bucket
|
|
2567
|
+
policy written against either matches no request.
|
|
2568
|
+
- `GetObjectAttributes` is left out, and neither `GetObject` nor `HeadObject` reports
|
|
2569
|
+
`x-amz-tagging-count`.
|
|
2570
|
+
- Tag keys and values are stored as they arrive. Real S3 bounds a key at 128 characters and a value
|
|
2571
|
+
at 256, and sim S3 accepts a longer one of either.
|
|
2572
|
+
- A Bucket mounted on a filesystem directory rebuilds each Object from the file on every read, and a
|
|
2573
|
+
directory holds no tags. Tagging one writes the same bytes back to the file, and the next read
|
|
2574
|
+
reports an untagged Object. Use the default in-memory storage to test tagging. See
|
|
2575
|
+
[Metadata a file cannot carry](#metadata-a-file-cannot-carry).
|
|
2576
|
+
|
|
2577
|
+
## Default encryption
|
|
2578
|
+
|
|
2579
|
+
Every Bucket is encrypted, and every Object written into one reports the algorithm it was stored
|
|
2580
|
+
under. Nothing is actually encrypted here. The bytes are stored as they arrive and the ETag stays
|
|
2581
|
+
the MD5 of them, which is what real S3 reports for an SSE-S3 Object too. What this gives a test is
|
|
2582
|
+
the answer S3 gives about an Object, so code that reads `ServerSideEncryption` or the
|
|
2583
|
+
`x-amz-server-side-encryption` header has something to read.
|
|
2584
|
+
|
|
2585
|
+
```typescript sim-s3-bucket-encryption
|
|
2586
|
+
/**
|
|
2587
|
+
* Configuring a simulated S3 Bucket's default encryption.
|
|
2588
|
+
*/
|
|
2589
|
+
|
|
2590
|
+
import {
|
|
2591
|
+
CreateBucketCommand,
|
|
2592
|
+
GetBucketEncryptionCommand,
|
|
2593
|
+
GetObjectCommand,
|
|
2594
|
+
PutBucketEncryptionCommand,
|
|
2595
|
+
PutObjectCommand,
|
|
2596
|
+
} from "@aws-sdk/client-s3";
|
|
2597
|
+
import { SimAws } from "@kensio/yulin";
|
|
2598
|
+
|
|
2599
|
+
const simAws = new SimAws();
|
|
2600
|
+
const simS3 = simAws.region("eu-west-2").s3();
|
|
2601
|
+
|
|
2602
|
+
await simS3.createBucket(new CreateBucketCommand({ Bucket: "documents" }));
|
|
2603
|
+
|
|
2604
|
+
await simS3.putBucketEncryption(
|
|
2605
|
+
new PutBucketEncryptionCommand({
|
|
2606
|
+
Bucket: "documents",
|
|
2607
|
+
ServerSideEncryptionConfiguration: {
|
|
2608
|
+
Rules: [
|
|
2609
|
+
{ ApplyServerSideEncryptionByDefault: { SSEAlgorithm: "aws:kms" } },
|
|
2610
|
+
],
|
|
2611
|
+
},
|
|
2612
|
+
}),
|
|
2613
|
+
);
|
|
2614
|
+
|
|
2615
|
+
await simS3.putObject(
|
|
2616
|
+
new PutObjectCommand({
|
|
2617
|
+
Bucket: "documents",
|
|
2618
|
+
Key: "contracts/one.pdf",
|
|
2619
|
+
Body: "one",
|
|
2620
|
+
}),
|
|
2621
|
+
);
|
|
2622
|
+
|
|
2623
|
+
const configured = await simS3.getBucketEncryption(
|
|
2624
|
+
new GetBucketEncryptionCommand({ Bucket: "documents" }),
|
|
2625
|
+
);
|
|
2626
|
+
const read = await simS3.getObject(
|
|
2627
|
+
new GetObjectCommand({ Bucket: "documents", Key: "contracts/one.pdf" }),
|
|
2628
|
+
);
|
|
2629
|
+
|
|
2630
|
+
// aws:kms, from the Bucket's configuration and from the Object it stamped.
|
|
2631
|
+
console.log(
|
|
2632
|
+
configured.ServerSideEncryptionConfiguration?.Rules?.[0]
|
|
2633
|
+
?.ApplyServerSideEncryptionByDefault?.SSEAlgorithm,
|
|
2634
|
+
read.ServerSideEncryption,
|
|
2635
|
+
);
|
|
2636
|
+
```
|
|
2637
|
+
|
|
2638
|
+
A write names its own algorithm, the Bucket's configuration answers for a write that names none, and
|
|
2639
|
+
a Bucket nobody has configured is `AES256`. Real S3 has encrypted every new Object that way since
|
|
2640
|
+
January 2023, and `GetBucketEncryption` answers for an unconfigured Bucket with the same `AES256`
|
|
2641
|
+
rule rather than an error. `DeleteBucketEncryption` puts a Bucket back to that rule, since there is
|
|
2642
|
+
no such thing as an unencrypted Bucket.
|
|
2643
|
+
|
|
2644
|
+
`AES256`, `aws:kms` and `aws:kms:dsse` are taken, and anything else is refused with
|
|
2645
|
+
`InvalidArgument`. The Objects already in a Bucket keep what they were written with when its
|
|
2646
|
+
configuration changes.
|
|
2647
|
+
|
|
2648
|
+
An Object that reached a Bucket without a write reports no encryption at all. That covers the files
|
|
2649
|
+
a mounted directory serves and the ones a CDK `BucketDeployment` publishes, since neither went
|
|
2650
|
+
through `PutObject` to be stamped by one.
|
|
2651
|
+
|
|
2652
|
+
An `AWS::S3::Bucket` `BucketEncryption` property is applied as the request is. CloudFormation states
|
|
2653
|
+
the rule under `ServerSideEncryptionByDefault` where the request states
|
|
2654
|
+
`ApplyServerSideEncryptionByDefault`, and the Resource translates that one name.
|
|
2655
|
+
|
|
2259
2656
|
## Lifecycle configuration
|
|
2260
2657
|
|
|
2261
2658
|
Sim S3 stores a Bucket's lifecycle rules and acts on them. An `Expiration` rule removes the Objects
|
|
2262
|
-
it selects once simulated time passes the boundary, a `
|
|
2263
|
-
history a versioned Bucket keeps, and an
|
|
2264
|
-
were started and left unfinished.
|
|
2659
|
+
it selects once simulated time passes the boundary, a `Transitions` rule moves them between storage
|
|
2660
|
+
classes, a `NoncurrentVersionExpiration` rule bounds the history a versioned Bucket keeps, and an
|
|
2661
|
+
`AbortIncompleteMultipartUpload` rule discards uploads that were started and left unfinished.
|
|
2265
2662
|
|
|
2266
2663
|
Retention is otherwise the one property of a log or a backup Bucket a test cannot demonstrate.
|
|
2267
2664
|
Reading the rules back off a deployed Bucket says the rules arrived. Putting an Object, moving the
|
|
@@ -2421,6 +2818,77 @@ A noncurrent version is removed from the Bucket's history, and a `GetObject` nam
|
|
|
2421
2818
|
answers `NoSuchVersion` afterwards. The current version is beyond every rule of this kind, however
|
|
2422
2819
|
old it is.
|
|
2423
2820
|
|
|
2821
|
+
### Transitioning between storage classes
|
|
2822
|
+
|
|
2823
|
+
A `Transitions` rule moves the Objects it selects into another storage class as the clock passes the
|
|
2824
|
+
days it names. A rule listing several walks an Object down them, and the last transition reached is
|
|
2825
|
+
where the Object is. `NoncurrentVersionTransitions` does the same for the versions a write has
|
|
2826
|
+
displaced, counted from the moment each stopped being current.
|
|
2827
|
+
|
|
2828
|
+
```typescript sim-s3-lifecycle-transition
|
|
2829
|
+
/**
|
|
2830
|
+
* Moving simulated S3 Objects between storage classes on a lifecycle rule.
|
|
2831
|
+
*/
|
|
2832
|
+
|
|
2833
|
+
import {
|
|
2834
|
+
CreateBucketCommand,
|
|
2835
|
+
ListObjectsV2Command,
|
|
2836
|
+
PutBucketLifecycleConfigurationCommand,
|
|
2837
|
+
PutObjectCommand,
|
|
2838
|
+
} from "@aws-sdk/client-s3";
|
|
2839
|
+
import { SimAws } from "@kensio/yulin";
|
|
2840
|
+
|
|
2841
|
+
const simAws = new SimAws();
|
|
2842
|
+
const simS3 = simAws.region("eu-west-2").s3();
|
|
2843
|
+
|
|
2844
|
+
await simS3.createBucket(new CreateBucketCommand({ Bucket: "logs" }));
|
|
2845
|
+
await simS3.putBucketLifecycleConfiguration(
|
|
2846
|
+
new PutBucketLifecycleConfigurationCommand({
|
|
2847
|
+
Bucket: "logs",
|
|
2848
|
+
LifecycleConfiguration: {
|
|
2849
|
+
Rules: [
|
|
2850
|
+
{
|
|
2851
|
+
ID: "cool-then-freeze",
|
|
2852
|
+
Status: "Enabled",
|
|
2853
|
+
Filter: { Prefix: "raw/" },
|
|
2854
|
+
Transitions: [
|
|
2855
|
+
{ Days: 30, StorageClass: "STANDARD_IA" },
|
|
2856
|
+
{ Days: 90, StorageClass: "GLACIER" },
|
|
2857
|
+
],
|
|
2858
|
+
},
|
|
2859
|
+
],
|
|
2860
|
+
},
|
|
2861
|
+
}),
|
|
2862
|
+
);
|
|
2863
|
+
|
|
2864
|
+
await simS3.putObject(
|
|
2865
|
+
new PutObjectCommand({
|
|
2866
|
+
Bucket: "logs",
|
|
2867
|
+
Key: "raw/2026-08-24.gz",
|
|
2868
|
+
Body: "one raw log line",
|
|
2869
|
+
}),
|
|
2870
|
+
);
|
|
2871
|
+
|
|
2872
|
+
await simAws.clock().advanceBy({ days: 90 });
|
|
2873
|
+
|
|
2874
|
+
const listing = await simS3.listObjectsV2(
|
|
2875
|
+
new ListObjectsV2Command({ Bucket: "logs", Prefix: "raw/" }),
|
|
2876
|
+
);
|
|
2877
|
+
|
|
2878
|
+
// GLACIER, the last transition the clock reached.
|
|
2879
|
+
console.log(listing.Contents?.[0]?.StorageClass);
|
|
2880
|
+
```
|
|
2881
|
+
|
|
2882
|
+
A transition is worked out when the Bucket is read, as an expiry is, so what a listing or a read
|
|
2883
|
+
reports is where the rules put the Object at that instant. The bytes stay where they are. Moving the
|
|
2884
|
+
clock back afterwards moves the Object back, and an expiry that has already happened stays done. The
|
|
2885
|
+
expiry deleted something on the way past, and a transition changed only what S3 says about the
|
|
2886
|
+
Object.
|
|
2887
|
+
|
|
2888
|
+
A rule naming a class S3 has no such class for is refused with `InvalidStorageClass` where the
|
|
2889
|
+
configuration is stored, before it reaches any Object. An `Expiration` on the same rule still expires
|
|
2890
|
+
at its own age, whatever the transitions have done in the meantime.
|
|
2891
|
+
|
|
2424
2892
|
### What a rule selects
|
|
2425
2893
|
|
|
2426
2894
|
A rule selects Objects by its `Filter`, or by the older top-level `Prefix`. A rule with no scope at
|
|
@@ -2430,8 +2898,73 @@ all covers every key in the Bucket. `Filter.Prefix`, `Filter.And.Prefix`, `Objec
|
|
|
2430
2898
|
A multipart upload is selected by its key alone. Half an upload has no size. A rule narrowed by an
|
|
2431
2899
|
object size bound abandons no upload.
|
|
2432
2900
|
|
|
2433
|
-
|
|
2434
|
-
|
|
2901
|
+
A rule narrowed by `Filter.Tag`, or by the `Filter.And.Tags` beside a prefix, selects the Objects
|
|
2902
|
+
carrying every tag it names. Both halves of a tag have to match, so a rule for `archive=true` leaves
|
|
2903
|
+
an Object tagged `archive=false` where it is. A template states the same thing as `TagFilters` beside
|
|
2904
|
+
the rule's `Prefix`, and it is read into the `Filter` the request takes. See
|
|
2905
|
+
[Object tags](#object-tags).
|
|
2906
|
+
|
|
2907
|
+
```typescript sim-s3-lifecycle-tag-filter
|
|
2908
|
+
/**
|
|
2909
|
+
* Expiring the simulated S3 Objects a tag selects.
|
|
2910
|
+
*/
|
|
2911
|
+
|
|
2912
|
+
import {
|
|
2913
|
+
CreateBucketCommand,
|
|
2914
|
+
ListObjectsV2Command,
|
|
2915
|
+
PutBucketLifecycleConfigurationCommand,
|
|
2916
|
+
PutObjectCommand,
|
|
2917
|
+
} from "@aws-sdk/client-s3";
|
|
2918
|
+
import { SimAws } from "@kensio/yulin";
|
|
2919
|
+
|
|
2920
|
+
const simAws = new SimAws();
|
|
2921
|
+
const simS3 = simAws.s3();
|
|
2922
|
+
|
|
2923
|
+
await simS3.createBucket(new CreateBucketCommand({ Bucket: "reports" }));
|
|
2924
|
+
|
|
2925
|
+
await simS3.putBucketLifecycleConfiguration(
|
|
2926
|
+
new PutBucketLifecycleConfigurationCommand({
|
|
2927
|
+
Bucket: "reports",
|
|
2928
|
+
LifecycleConfiguration: {
|
|
2929
|
+
Rules: [
|
|
2930
|
+
{
|
|
2931
|
+
ID: "expire-temporary",
|
|
2932
|
+
Status: "Enabled",
|
|
2933
|
+
Filter: { Tag: { Key: "lifecycle", Value: "temporary" } },
|
|
2934
|
+
Expiration: { Days: 7 },
|
|
2935
|
+
},
|
|
2936
|
+
],
|
|
2937
|
+
},
|
|
2938
|
+
}),
|
|
2939
|
+
);
|
|
2940
|
+
|
|
2941
|
+
await simS3.putObject(
|
|
2942
|
+
new PutObjectCommand({
|
|
2943
|
+
Bucket: "reports",
|
|
2944
|
+
Key: "draft.csv",
|
|
2945
|
+
Body: "period,total",
|
|
2946
|
+
Tagging: "lifecycle=temporary",
|
|
2947
|
+
}),
|
|
2948
|
+
);
|
|
2949
|
+
await simS3.putObject(
|
|
2950
|
+
new PutObjectCommand({ Bucket: "reports", Key: "final.csv", Body: "a,b" }),
|
|
2951
|
+
);
|
|
2952
|
+
|
|
2953
|
+
await simAws.clock().advanceBy({ days: 8 });
|
|
2954
|
+
|
|
2955
|
+
const listing = await simS3.listObjectsV2(
|
|
2956
|
+
new ListObjectsV2Command({ Bucket: "reports" }),
|
|
2957
|
+
);
|
|
2958
|
+
|
|
2959
|
+
// Only final.csv. The tagged draft is past its expiry.
|
|
2960
|
+
console.log(listing.Contents?.map((entry) => entry.Key));
|
|
2961
|
+
```
|
|
2962
|
+
|
|
2963
|
+
A tagging request that takes an Object out of a rule's reach takes it out for good. The rule reads
|
|
2964
|
+
the tags the Object carries at the moment the Bucket is read.
|
|
2965
|
+
|
|
2966
|
+
An Object a rule reaches by tag alone is reached wherever it is in the Bucket. A bare `Filter.Tag`
|
|
2967
|
+
says nothing about the key.
|
|
2435
2968
|
|
|
2436
2969
|
### Reading and replacing the rules
|
|
2437
2970
|
|
|
@@ -2513,28 +3046,30 @@ CloudFormation spells some rule fields differently from the request. `Id` become
|
|
|
2513
3046
|
`TransitionInDays` becomes `Days`. The singular `Transition` a template may state alongside
|
|
2514
3047
|
`Transitions` joins the list. `NoncurrentVersionExpirationInDays` becomes the `NoncurrentDays` of a
|
|
2515
3048
|
`NoncurrentVersionExpiration`, which is what CDK's `noncurrentVersionExpiration` synthesises, and a
|
|
2516
|
-
template stating the nested object instead is taken as it stands.
|
|
2517
|
-
|
|
3049
|
+
template stating the nested object instead is taken as it stands. `TagFilters` becomes the `Filter`
|
|
3050
|
+
the request holds a rule's tags in, taking the rule's `Prefix` in with it where it states one.
|
|
3051
|
+
Everything else, `Status`, `AbortIncompleteMultipartUpload` and the object size bounds among them, is
|
|
2518
3052
|
carried across as the template stated it.
|
|
2519
3053
|
|
|
2520
3054
|
`LifecycleConfiguration` is one of the properties simulated S3 acts on. It stays out of
|
|
2521
3055
|
[`stack.ignoredProperties`](https://yulinsim.dev/services/cloudformation/#properties-a-resource-was-created-without).
|
|
2522
|
-
The
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
[What a rule selects](#what-a-rule-selects).
|
|
3056
|
+
The actions it enforces are `Expiration`, whether the template flattened it onto the rule or not,
|
|
3057
|
+
`Transitions` and `NoncurrentVersionTransitions`, `NoncurrentVersionExpiration`, in either of its
|
|
3058
|
+
two spellings, and `AbortIncompleteMultipartUpload`. Which Objects an enforced action reaches is
|
|
3059
|
+
decided by the fields listed under [What a rule selects](#what-a-rule-selects).
|
|
2526
3060
|
|
|
2527
3061
|
### Limitations
|
|
2528
3062
|
|
|
2529
|
-
|
|
2530
|
-
`
|
|
3063
|
+
Real S3 raises `s3:LifecycleExpiration:Delete` when a rule removes an Object, and
|
|
3064
|
+
`s3:LifecycleTransition` when one moves an Object. Both event families are among the ones sim S3
|
|
3065
|
+
leaves out. An expiry and a transition here are silent.
|
|
2531
3066
|
|
|
2532
|
-
|
|
2533
|
-
|
|
3067
|
+
A transition changes the class an Object reads back in and nothing else. Real S3 also takes an
|
|
3068
|
+
Object in an archival class out of reach until `RestoreObject` has brought it back, and sim S3
|
|
3069
|
+
serves every Object whatever class a rule has moved it to.
|
|
2534
3070
|
|
|
2535
|
-
`
|
|
2536
|
-
|
|
2537
|
-
version and leaves the version itself where it is, which is what real S3 does, and a
|
|
3071
|
+
An `Expiration` rule on a versioned Bucket writes a delete marker over the current version and
|
|
3072
|
+
leaves the version itself where it is, which is what real S3 does, and a
|
|
2538
3073
|
`NoncurrentVersionExpiration` rule is what then removes it. See
|
|
2539
3074
|
[Object versioning](#object-versioning).
|
|
2540
3075
|
|
|
@@ -2870,6 +3405,52 @@ const s3Client = new S3Client({
|
|
|
2870
3405
|
});
|
|
2871
3406
|
```
|
|
2872
3407
|
|
|
3408
|
+
### What an upload says about the Object
|
|
3409
|
+
|
|
3410
|
+
An upload keeps the metadata headers it was sent. `cache-control`, `content-disposition`,
|
|
3411
|
+
`content-encoding`, `content-language`, `content-type` and `expires` are stored, and a read is
|
|
3412
|
+
served every one of them, the way it serves an Object written by a `PutObjectCommand`. See
|
|
3413
|
+
[Object system metadata](#object-system-metadata). An `x-amz-meta-` header is stored too. An
|
|
3414
|
+
`x-amz-tagging` header puts the tags it names on the Object, the same way a `PutObjectCommand`
|
|
3415
|
+
does. See [Object tags](#object-tags).
|
|
3416
|
+
|
|
3417
|
+
```typescript
|
|
3418
|
+
await fetch(url, {
|
|
3419
|
+
method: "PUT",
|
|
3420
|
+
body: styleSheet,
|
|
3421
|
+
headers: {
|
|
3422
|
+
"content-type": "text/css",
|
|
3423
|
+
"cache-control": "public, max-age=31536000, immutable",
|
|
3424
|
+
},
|
|
3425
|
+
});
|
|
3426
|
+
```
|
|
3427
|
+
|
|
3428
|
+
### Headers the URL asks for
|
|
3429
|
+
|
|
3430
|
+
A read can name the headers it wants the Object served with. The SDK sets them from
|
|
3431
|
+
`ResponseContentType`, `ResponseContentDisposition`, `ResponseCacheControl`,
|
|
3432
|
+
`ResponseContentEncoding`, `ResponseContentLanguage` and `ResponseExpires`, and carries them in the
|
|
3433
|
+
`response-` query parameters real S3 reads. Simulated S3 serves those values in place of the
|
|
3434
|
+
Object's own.
|
|
3435
|
+
|
|
3436
|
+
```typescript
|
|
3437
|
+
const url = await getSignedUrl(
|
|
3438
|
+
s3Client,
|
|
3439
|
+
new GetObjectCommand({
|
|
3440
|
+
Bucket: "reports",
|
|
3441
|
+
Key: "q3/report.pdf",
|
|
3442
|
+
ResponseContentType: "application/octet-stream",
|
|
3443
|
+
ResponseContentDisposition: 'attachment; filename="q3-report.pdf"',
|
|
3444
|
+
}),
|
|
3445
|
+
{ expiresIn: 900 },
|
|
3446
|
+
);
|
|
3447
|
+
```
|
|
3448
|
+
|
|
3449
|
+
The Object keeps the metadata it was written with. One URL can hand a browser a download while
|
|
3450
|
+
another shows the same Object in the page. A `HEAD` reads the parameters as a `GET` does, and the
|
|
3451
|
+
API endpoint honours them for any read rather than only a presigned one. The website endpoint serves
|
|
3452
|
+
none of them, as real S3 serves none there.
|
|
3453
|
+
|
|
2873
3454
|
### Limitations
|
|
2874
3455
|
|
|
2875
3456
|
- `GET`, `HEAD`, `PUT` and `DELETE` of an Object are served over a Bucket's own REST endpoint, which
|
|
@@ -3139,13 +3720,7 @@ Filesystem storage is somewhat restrictive to make it slightly safer:
|
|
|
3139
3720
|
- Object keys must not be absolute paths or contain `..`
|
|
3140
3721
|
- Only files whose extension is on a cautious list are served (see below)
|
|
3141
3722
|
- Symlinks are ignored when listing Objects
|
|
3142
|
-
- Deletion is refused
|
|
3143
|
-
|
|
3144
|
-
`DeleteObject` against a filesystem-backed Bucket raises `NotImplemented`, and `DeleteObjects`
|
|
3145
|
-
reports the same code for every key. This is stricter than real S3, deliberately. The directory a
|
|
3146
|
-
Bucket is mounted on is an ordinary directory of yours, and removing files from it because a test
|
|
3147
|
-
called `DeleteObject` would be a poor default. Leave a Bucket on the default in-memory storage
|
|
3148
|
-
when a test needs deletion to work.
|
|
3723
|
+
- Deletion is refused until the mount asks for it (see below)
|
|
3149
3724
|
|
|
3150
3725
|
When reading files from filesystem-backed storage, Yulin infers common `content-type` metadata from
|
|
3151
3726
|
file extensions such as `.html`, `.css`, `.js`, `.json`, `.png`, `.svg`, `.txt`, `.csv`, `.pdf`,
|
|
@@ -3154,6 +3729,43 @@ file extensions such as `.html`, `.css`, `.js`, `.json`, `.png`, `.svg`, `.txt`,
|
|
|
3154
3729
|
for an extension a mount named itself, below. No other file is served at all, with or without a
|
|
3155
3730
|
type.
|
|
3156
3731
|
|
|
3732
|
+
### Deleting the files under a mount
|
|
3733
|
+
|
|
3734
|
+
`DeleteObject` against a filesystem-backed Bucket raises `NotImplemented`, and `DeleteObjects`
|
|
3735
|
+
reports the same code for every key. This is stricter than real S3, deliberately. The directory a
|
|
3736
|
+
Bucket is mounted on is an ordinary directory of yours, and removing files from it because a test
|
|
3737
|
+
called `DeleteObject` would be a poor default.
|
|
3738
|
+
|
|
3739
|
+
Code that deletes what it uploaded needs a Bucket that can. A mount says so with `allowDelete`, and
|
|
3740
|
+
a delete then unlinks the file, reports the removal and raises the `ObjectRemoved:Delete` event an
|
|
3741
|
+
in-memory Bucket raises:
|
|
3742
|
+
|
|
3743
|
+
```typescript sim-s3-mount-allow-delete
|
|
3744
|
+
/**
|
|
3745
|
+
* Letting a mounted Bucket delete the files it serves.
|
|
3746
|
+
*/
|
|
3747
|
+
|
|
3748
|
+
import path from "node:path";
|
|
3749
|
+
|
|
3750
|
+
import { CreateBucketCommand } from "@aws-sdk/client-s3";
|
|
3751
|
+
import { SimAws } from "@kensio/yulin";
|
|
3752
|
+
|
|
3753
|
+
const simAws = new SimAws();
|
|
3754
|
+
|
|
3755
|
+
await simAws.s3().createBucket(new CreateBucketCommand({ Bucket: "uploads" }));
|
|
3756
|
+
|
|
3757
|
+
simAws
|
|
3758
|
+
.s3()
|
|
3759
|
+
.mountBucketFilesystem("uploads", path.join(process.cwd(), "assets"), {
|
|
3760
|
+
allowDelete: true,
|
|
3761
|
+
});
|
|
3762
|
+
```
|
|
3763
|
+
|
|
3764
|
+
The key goes through the checks above either way. A delete naming a path that climbs out of the
|
|
3765
|
+
directory is refused, and so is one naming a file type the mount does not serve. The directory the
|
|
3766
|
+
file was in stays where it is, since a Bucket has no directories for an empty one to be. Leave the
|
|
3767
|
+
option off and the refusal stands, naming the directory it would have unlinked from.
|
|
3768
|
+
|
|
3157
3769
|
### Serving a file extension of your own
|
|
3158
3770
|
|
|
3159
3771
|
A mounted Bucket only serves files whose extension is on a cautious list (the web's own types, and
|
|
@@ -3311,10 +3923,14 @@ write attached, and nothing else.
|
|
|
3311
3923
|
|
|
3312
3924
|
Every path that serves an Object goes through the same mapping. The REST endpoint, the
|
|
3313
3925
|
[website endpoint](#static-website-hosting) and a CloudFront S3 Origin all report the same headers
|
|
3314
|
-
for it.
|
|
3926
|
+
for it. User-defined metadata travels alongside them, one `x-amz-meta-` header per entry. An SDK
|
|
3927
|
+
client reading over an endpoint reports the same `Metadata` an in-process read does.
|
|
3928
|
+
`content-encoding` is the one that matters most. Bytes served without it are bytes no client
|
|
3315
3929
|
can decode, and an Object stored as brotli is only usable if the header comes back with it.
|
|
3316
3930
|
|
|
3317
|
-
`PutObjectCommand` sets them, one request field per header.
|
|
3931
|
+
`PutObjectCommand` sets them, one request field per header. An upload over a
|
|
3932
|
+
[served endpoint](#presigned-urls) sets them in the headers themselves, which is the form the SDK
|
|
3933
|
+
sends them in.
|
|
3318
3934
|
|
|
3319
3935
|
```typescript sim-s3-object-system-metadata
|
|
3320
3936
|
/**
|
|
@@ -3363,6 +3979,10 @@ read of an Object written without one reports `binary/octet-stream`.
|
|
|
3363
3979
|
way in. A read hands back the stored HTTP date as `ExpiresString`, alongside the same value parsed
|
|
3364
3980
|
into a `Date` as `Expires`.
|
|
3365
3981
|
|
|
3982
|
+
A read can ask for headers of its own in place of these. See
|
|
3983
|
+
[Headers the URL asks for](#headers-the-url-asks-for). The Object goes on holding what it was
|
|
3984
|
+
written with.
|
|
3985
|
+
|
|
3366
3986
|
A CDK BucketDeployment's `SystemMetadata` sets the same headers on every Object it copies. See
|
|
3367
3987
|
[CDK S3 BucketDeployment](https://yulinsim.dev/services/cloudformation/#cdk-s3-bucketdeployment). A
|
|
3368
3988
|
[mounted directory](#metadata-a-file-cannot-carry) declares them for the Objects under a key prefix,
|
|
@@ -3427,8 +4047,8 @@ Sim S3 currently supports:
|
|
|
3427
4047
|
removable on its own
|
|
3428
4048
|
- `PutBucketWebsiteCommand`, for static website hosting
|
|
3429
4049
|
- `PutBucketLifecycleConfigurationCommand`, `GetBucketLifecycleConfigurationCommand` and
|
|
3430
|
-
`DeleteBucketLifecycleCommand`, storing a Bucket's lifecycle rules and
|
|
3431
|
-
|
|
4050
|
+
`DeleteBucketLifecycleCommand`, storing a Bucket's lifecycle rules and expiring, transitioning and
|
|
4051
|
+
abandoning against them in simulated time
|
|
3432
4052
|
- `PutBucketPolicyCommand`, `GetBucketPolicyCommand` and `DeleteBucketPolicyCommand`, evaluated by
|
|
3433
4053
|
sim IAM alongside identity policies
|
|
3434
4054
|
- The `AWS::S3::Bucket` and `AWS::S3::BucketPolicy` CloudFormation resources
|
|
@@ -3438,16 +4058,27 @@ Sim S3 currently supports:
|
|
|
3438
4058
|
- Serving Object `GET`, `HEAD`, `PUT` and `DELETE` over the S3 REST endpoint, authorized by sim IAM,
|
|
3439
4059
|
and the `?uploads` and `?uploadId` sub-resources a multipart upload is made of
|
|
3440
4060
|
- Presigned URLs built by the real `@aws-sdk/s3-request-presigner`, with expiry in simulated time
|
|
3441
|
-
- Object system metadata set by a `PutObjectCommand
|
|
3442
|
-
that serves an Object
|
|
4061
|
+
- Object system metadata set by a `PutObjectCommand`, or by the headers of an upload over a served
|
|
4062
|
+
endpoint, and returned on a read, over every endpoint that serves an Object
|
|
4063
|
+
- `response-` parameters on a read, serving the headers the request named in place of the Object's
|
|
4064
|
+
own, which is what a presigned URL offering a download uses
|
|
4065
|
+
- `EncodingType` on a listing, encoding the keys, prefixes and markers it answers with
|
|
4066
|
+
- Object storage classes, named on a write and moved by a lifecycle rule, reported on a listing and
|
|
4067
|
+
on a read
|
|
4068
|
+
- Object tags, taken on a write and on a copy, read and replaced by `PutObjectTaggingCommand`,
|
|
4069
|
+
`GetObjectTaggingCommand` and `DeleteObjectTaggingCommand`, filtered on by a lifecycle rule, and
|
|
4070
|
+
raising `s3:ObjectTagging:Put` and `s3:ObjectTagging:Delete`
|
|
4071
|
+
- `PutBucketEncryptionCommand`, `GetBucketEncryptionCommand` and `DeleteBucketEncryptionCommand`,
|
|
4072
|
+
and the `BucketEncryption` property of an `AWS::S3::Bucket`, deciding the algorithm an Object
|
|
4073
|
+
reports
|
|
3443
4074
|
- Bucket website index documents, error documents, trailing-slash redirects, redirect-all
|
|
3444
4075
|
configuration, and routing-rule redirects
|
|
3445
4076
|
- Bucket-global uniqueness within a `SimAws` instance across simulated Accounts and Regions
|
|
3446
4077
|
- In-memory Object storage by default
|
|
3447
4078
|
- Optional filesystem-backed Bucket storage with `mountBucketFilesystem(...)`, watching the mounted
|
|
3448
|
-
directory and reloading connected browsers when it is rebuilt,
|
|
4079
|
+
directory and reloading connected browsers when it is rebuilt, reporting the system metadata a
|
|
3449
4080
|
CDK `BucketDeployment` into the same Bucket published, alongside anything the mount declares for a
|
|
3450
|
-
key prefix itself
|
|
4081
|
+
key prefix itself, and deleting the files under it where the mount allows that
|
|
3451
4082
|
|
|
3452
4083
|
The simulator aims at useful behaviour for tests and local development, short of full S3 feature
|
|
3453
4084
|
parity. Unsupported S3 options may be ignored or may throw errors depending on whether the simulator
|
|
@@ -3457,16 +4088,16 @@ needs them to model the requested behaviour.
|
|
|
3457
4088
|
|
|
3458
4089
|
These apply across the page. The sections above each list what is specific to them.
|
|
3459
4090
|
|
|
3460
|
-
- A
|
|
3461
|
-
left out, and
|
|
3462
|
-
|
|
3463
|
-
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
-
|
|
3469
|
-
a
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
4091
|
+
- A storage class says where S3 keeps an Object and nothing else. Every Object is readable whatever
|
|
4092
|
+
class it is in, `RestoreObject` is left out, and nothing costs or takes longer in one class than
|
|
4093
|
+
another. See [Storage classes](#storage-classes).
|
|
4094
|
+
- `EncodingType` is read on `ListObjects` and `ListObjectsV2`. `ListMultipartUploads` and
|
|
4095
|
+
`ListParts` ignore it, and both answer on one page.
|
|
4096
|
+
- ACLs and replication are left out. Server-side encryption is reported and never applied, and an
|
|
4097
|
+
`aws:kms` Object names no key, because there is no simulated KMS behind it. See
|
|
4098
|
+
[Default encryption](#default-encryption).
|
|
4099
|
+
- A Bucket using filesystem-backed storage refuses a delete unless the mount allowed one, and hears
|
|
4100
|
+
nothing about a file something else wrote under the directory. See
|
|
4101
|
+
[Deleting the files under a mount](#deleting-the-files-under-a-mount).
|
|
4102
|
+
- Multipart upload parts for a mounted Bucket are held in memory, and only the assembled Object
|
|
4103
|
+
reaches the directory.
|