Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Router: CloudFormation Custom Resource #1268

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

willfarrell
Copy link
Member

Copy link

socket-security bot commented Dec 13, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@airbnb/node-memwatch@2.0.0 Transitive: environment, filesystem +3 1.19 MB milesj
npm/@aws-sdk/client-apigatewaymanagementapi@3.709.0 Transitive: environment, filesystem, shell +69 2.56 MB aws-sdk-bot
npm/@aws-sdk/client-appconfigdata@3.709.0 Transitive: environment, filesystem, shell +69 2.58 MB aws-sdk-bot
npm/@aws-sdk/client-dynamodb@3.709.0 Transitive: environment, filesystem, shell +75 4.78 MB aws-sdk-bot
npm/@aws-sdk/client-s3@3.709.0 Transitive: environment, filesystem, shell +95 6.34 MB aws-sdk-bot
npm/@aws-sdk/client-secrets-manager@3.709.0 Transitive: environment, filesystem, shell +70 3.04 MB aws-sdk-bot
npm/@aws-sdk/client-servicediscovery@3.709.0 Transitive: environment, filesystem, shell +70 3.08 MB aws-sdk-bot
npm/@aws-sdk/client-sqs@3.709.0 Transitive: environment, filesystem, shell +71 3.12 MB aws-sdk-bot
npm/@aws-sdk/client-ssm@3.709.0 Transitive: environment, filesystem, shell +71 6.12 MB aws-sdk-bot
npm/@aws-sdk/client-sts@3.709.0 Transitive: environment, filesystem, shell +69 2.86 MB aws-sdk-bot
npm/@aws-sdk/rds-signer@3.709.0 Transitive: environment, filesystem, shell +73 3.09 MB aws-sdk-bot
npm/@aws-sdk/util-dynamodb@3.709.0 None +1 146 kB aws-sdk-bot
npm/@commitlint/cli@19.6.0 Transitive: environment, filesystem, shell, unsafe +89 7.34 MB escapedcat
npm/@commitlint/config-conventional@19.6.0 Transitive: filesystem +10 2.5 MB escapedcat
npm/@datastream/core@0.0.40 Transitive: environment +11 806 kB willfarrell
npm/@fastify/busboy@3.1.0 None 0 80.1 kB gurgunday
npm/@middy/core@6.0.0 None 0 17.6 kB lmammino
npm/@middy/do-not-wait-for-empty-event-loop@6.0.0 None 0 5.48 kB lmammino
npm/@middy/util@6.0.0 None 0 19.4 kB lmammino
npm/@middy/validator@6.0.0 None 0 9.23 kB lmammino
npm/@serverless/event-mocks@1.1.1 None +2 2.32 MB aj.stuyvenberg
npm/@types/aws-lambda@8.10.146 None 0 167 kB types
npm/@types/node@20.17.10 None +1 2.3 MB types
npm/ajv-bsontype@1.0.7 None 0 4.9 kB bolamn
npm/ajv-cmd@0.7.11 Transitive: environment, filesystem, network +8 1.56 MB willfarrell
npm/ajv-errors@3.0.0 None 0 53.2 kB esp
npm/ajv-formats-draft2019@1.6.1 Transitive: filesystem, shell +12 942 kB additiveamateur
npm/ajv-formats@3.0.1 None 0 56.8 kB jason-green
npm/ajv-ftl-i18n@0.1.1 Transitive: environment, filesystem, shell +20 970 kB willfarrell
npm/aws-embedded-metrics@4.2.0 environment, network +1 185 kB jaredcnance
npm/aws-sdk-client-mock@4.1.0 Transitive: environment, eval +18 8.02 MB m-radzikowski
npm/aws-xray-sdk@3.10.2 Transitive: environment, filesystem, network, unsafe +41 3.94 MB awsxray
npm/esbuild@0.24.0 environment, filesystem, network, shell +24 245 MB evanw
npm/husky@9.1.7 None 0 4.04 kB typicode
npm/json-mask@2.0.0 None 0 27.2 kB nemtsov
npm/lint-staged@15.2.11 Transitive: environment, filesystem, shell +54 2.25 MB okonet
npm/negotiator@1.0.0 None 0 28.7 kB wesleytodd
npm/prettier@3.4.2 None 0 7.83 MB prettier-bot
npm/tinybench@3.0.7 None 0 129 kB aslemammad
npm/ts-standard@12.0.2 Transitive: environment, eval, filesystem, shell, unsafe +283 26.5 MB linusu
npm/tsd@0.31.2 Transitive: environment, filesystem +108 50.1 MB sindresorhus
npm/type-fest@4.30.0 None 0 400 kB sindresorhus
npm/typescript@5.7.2 None 0 22.7 MB typescript-bot

🚮 Removed packages: npm/@docusaurus/core@3.6.3, npm/@docusaurus/module-type-aliases@3.6.3, npm/@docusaurus/preset-classic@3.6.3, npm/@docusaurus/remark-plugin-npm2yarn@3.6.3, npm/@docusaurus/types@3.6.3, npm/@mdx-js/react@3.1.0, npm/classnames@2.5.1, npm/clsx@2.1.1, npm/docusaurus-lunr-search@3.5.0

View full report↗︎

@willfarrell willfarrell changed the title Feature/cloudformation custom resource router New Router: CloudFormation Custom Resource Dec 13, 2024
@willfarrell willfarrell marked this pull request as draft December 13, 2024 16:38
Co-authored-by: David Wells <hello@davidwells.io>
Comment on lines +32 to +39
if (typeof handler !== 'undefined') {
const response = handler(event, context, abort)
response.Status ??= 'SUCCESS'
response.RequestId ??= event.RequestId
response.LogicalResourceId ??= event.LogicalResourceId
response.StackId ??= event.StackId
return response
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if it also reported to the responseUrl, I feel like even though the abstraction is nice, it doesn't really add that much value currently as it's still the responsibility of the developer to correctly handle all errors and respond.

The auto reporting implementation is more what I was looking for honestly

return (event, context, abort) => {
const { RequestType: requestType } = event
if (!requestType) {
return notFoundResponse({ requestType })

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would for example expect that here we report to cloudformation that we have a failure, because if we don't do that cloudformation will simply wait x time until it timeouts whilst we already know that we won't be handling the request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants