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

Plugin issue with serverless 3.39.0 #252

Closed
grzes-94 opened this issue Jun 18, 2024 · 3 comments
Closed

Plugin issue with serverless 3.39.0 #252

grzes-94 opened this issue Jun 18, 2024 · 3 comments
Assignees
Labels
bug Something isn't working status: resolved/fixed

Comments

@grzes-94
Copy link

grzes-94 commented Jun 18, 2024

custom-resources lambda is not being updated properly after updating to serveless 3.39.0 which changed lambda runtime to node18

Plugin searches for AWS.config.logger = console; here which was recently removed from serverless code.

In a result AWS.config.s3ForcePathStyle = true; is added at the end of the utils.js file

module.exports = {
  logger,
  response,
  getEnvironment,
  getLambdaArn,
  handlerWrapper,
  wait,
  MAX_AWS_REQUEST_TRY,
};AWS.config.s3ForcePathStyle = true;

Running lambda fails with exception as node18 lambdas uses AWS SDK v3

2024-06-18T09:45:55.149Z	undefined	ERROR	Uncaught Exception 	
{
    "errorType": "ReferenceError",
    "errorMessage": "AWS is not defined",
    "stack": [
        "ReferenceError: AWS is not defined",
        "    at Object.<anonymous> (/var/task/utils.js:107:3)",
        "    at Module._compile (node:internal/modules/cjs/loader:1364:14)",
        "    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)",
        "    at Module.load (node:internal/modules/cjs/loader:1203:32)",
        "    at Module._load (node:internal/modules/cjs/loader:1019:12)",
        "    at Module.require (node:internal/modules/cjs/loader:1231:19)",
        "    at require (node:internal/modules/helpers:177:18)",
        "    at Object.<anonymous> (/var/task/api-gateway-cloud-watch-role/handler.js:3:39)",
        "    at Module._compile (node:internal/modules/cjs/loader:1364:14)",
        "    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)"
    ]
}
@dfangl dfangl self-assigned this Jun 18, 2024
@dfangl dfangl added bug Something isn't working status: in progress labels Jun 18, 2024
@dfangl
Copy link
Member

dfangl commented Jun 18, 2024

Thank you for the detailed report and investigation!
We will work on a patch to make serverless-localstack compatible with the latest serverless version again, and update you here on the progress.

@dfangl
Copy link
Member

dfangl commented Jun 21, 2024

This issue should now be fixed with #254. A new version of the plugin was released minutes ago.
Can you confirm your issues are fixed?

Thank you for reporting this bug!

@grzes-94
Copy link
Author

Its working as expected now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status: resolved/fixed
Projects
None yet
Development

No branches or pull requests

2 participants