Having troubles updating SST to the latest... when...
# help
g
Having troubles updating SST to the latest... when trying to deploy I get export cannot be deleted as it is in use. I did not actually delete it all I did was update the CDK basically. Anyone know what to do for this? Specifically my lambda authorizer right now. Old:
Copy code
const createAuthorizer = (app: cdk.Construct, role: string, resourceHelper: ResourceHelper, props?: Partial<HttpLambdaAuthorizerProps>) => {
	return new HttpLambdaAuthorizer({
		...props,
		responseTypes: [HttpLambdaResponseType.SIMPLE],
		authorizerName: role.toLowerCase(),
		handler: new sst.Function(app, `${role[0].toUpperCase() + role.substring(1).toLowerCase()}Authorizer`, {
			handler: 'src/functions/authorizer/index.handler',
			...resourceHelper.getResources(['Dynamo'], {
				environment: { AUTH_ROLE: role.toUpperCase() },
				permissions: []
			})
		})
	})
}
New:
Copy code
const createAuthorizer = (app: Construct, role: string, resourceHelper: ResourceHelper, props?: Partial<HttpLambdaAuthorizerProps>) => {
	const authorizer = new sst.Function(app, `${role[0].toUpperCase() + role.substring(1).toLowerCase()}Authorizer`, {
		handler: 'src/functions/authorizer/index.handler',
		...resourceHelper.getResources(['Dynamo'], {
			environment: { AUTH_ROLE: role.toUpperCase() },
			permissions: []
		})
	})

	return new HttpLambdaAuthorizer(`${role[0].toUpperCase() + role.substring(1).toLowerCase()}Authorizer`, authorizer, {
		...props,
		responseTypes: [HttpLambdaResponseType.SIMPLE],
		authorizerName: role.toLowerCase()
	})
}
Never mind I figured it out looks like the changelog for release 0.57.0 is wrong 😅 Needed to make the HttpLambdaAuthorizer id the same as the authorizerName from the old code not the same as the function id.
f
Ah nice catch. Updated!