npm @serverless-stack/cli 0.57.0
v0.57.0

latest releases: 1.18.4, 1.18.3, 1.18.2...
2 years ago

💥 Breaking Change in CDK

If you are using the Api, ApolloApi, or WebSocketApi construct in your app, and if you are configuring JWT or CUSTOM authorizers, there has been a recent change. And here is what you need to change after you update.

If you are using Api or ApolloApi with HttpJwtAuthorizer authorizer

Change this:

new HttpJwtAuthorizer({
  jwtAudience: ["UsGRQJJz5sDfPQDs6bhQ9Oc3hNISuVif"],
  jwtIssuer: "https://myorg.us.auth0.com",
})

to:

new HttpJwtAuthorizer("Authorizer", "https://myorg.us.auth0.com", {
  jwtAudience: ["UsGRQJJz5sDfPQDs6bhQ9Oc3hNISuVif"],
})

If you are using Api or ApolloApi with HttpUserPoolAuthorizer authorizer

Change this:

new HttpUserPoolAuthorizer({
  userPool,
  userPoolClients: [userPoolClient],
})

to:

new HttpUserPoolAuthorizer("Authorizer", userPool, {
  userPoolClients: [userPoolClient],
})

If you are using Api or ApolloApi with HttpLambdaAuthorizer authorizer

Change this:

new HttpLambdaAuthorizer({
  authorizerName: "LambdaAuthorizer",
  handler: new sst.Function(this, "Authorizer", {
    handler: "src/authorizer.main",
  }),
})

to:

const authorizer = new sst.Function(this, "AuthorizerFn", {
  handler: "src/authorizer.main",
});

new HttpLambdaAuthorizer("LambdaAuthorizer", authorizer, {
  authorizerName: "LambdaAuthorizer",
})

If you are using WebSocketApi with HttpLambdaAuthorizer authorizer

Change this:

new HttpLambdaAuthorizer({
  authorizerName: "LambdaAuthorizer",
  handler: new sst.Function(this, "Authorizer", {
    handler: "src/authorizer.main",
  }),
})

to:

const authorizer = new sst.Function(this, "AuthorizerFn", {
  handler: "src/authorizer.main",
});

new WebSocketLambdaAuthorizer("LambdaAuthorizer", authorizer, {
  authorizerName: "LambdaAuthorizer",
  identitySource: ["route.request.header.Authorization"],
})

More info

🚀 Enhancement

  • #1242 Update CDK to v1.138.0 (@fwang)
  • #1240 Console: Filter out stacks that do not match supported console version (@thdxr)
  • #1217 Console: Leave the function request body after an invocation (@Manitej66)

🐛 Bug Fix

Contributors


Update using:

$ npx sst update 0.57.0
$ yarn sst update 0.57.0

Don't miss a new cli release

NewReleases is sending notifications on new releases.