Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion course-04/exercises/lesson-6/solution/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"http-aws-es": "^6.0.0",
"jimp": "^0.6.4",
"jsonwebtoken": "^8.5.1",
"middy": "^0.25.0",
"middy": "^0.36.0",

Choose a reason for hiding this comment

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

critical

This upgrade to middy@0.36.0 introduces breaking changes that will cause the application to fail. Starting from v0.30.0, middy middlewares were moved to their own packages under the @middy scope (e.g., @middy/http-cors). The middy package at this version includes these as dependencies, but the import paths in your code must be updated.

Here are the required changes:

  1. In src/lambda/http/createImage.ts:

    • Change import { cors } from 'middy/middlewares' to import cors from '@middy/http-cors'. The cors middleware is now a default export.
  2. In src/lambda/auth/auth0Authorizer.ts:

    • Change import { secretsManager } from 'middy/middlewares' to import secretsManager from '@middy/secrets-manager'. The secretsManager middleware is now a default export.
  3. In both of the above files, and any other file using middy, it is recommended to change import * as middy from 'middy' to import middy from 'middy' as middy is now a default export.

Without these changes, the lambdas using middy will fail at runtime.

"source-map-support": "^0.5.11",
"uuid": "^3.3.2"
},
Expand Down