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

Use named handler export rather than default export for lambdas #37

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ajmacd
Copy link

@ajmacd ajmacd commented Sep 16, 2023

The lambdas were erroring with:

{
    "errorType": "Runtime.HandlerNotFound",
    "errorMessage": "index.handler is undefined or not exported"
}

AFAICT, the handler function needs to be a named, and not default, export.

Furthermore, it appeared that, in some cases at least, the startstop lambda could exit before the network request to the ECSClient completed. This also now awaits the response before exiting the lambda.

Finally, this causes the status lambda to always return some value.

Update fork from upstream
Use named handler export rather than default export for lambdas
@sonarcloud
Copy link

sonarcloud bot commented Sep 16, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell B 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@ajmacd
Copy link
Author

ajmacd commented Sep 16, 2023

@RyoshiKayo interested in your perspective here if you get a chance to take a look, as the (apparently) breaking changes were due to the improvements you made earlier this year. Curious to know why you weren't hitting the issue.

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

Successfully merging this pull request may close these issues.

1 participant