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

Update dependencies and distros #65

Merged
merged 3 commits into from
May 9, 2023
Merged

Update dependencies and distros #65

merged 3 commits into from
May 9, 2023

Conversation

andclt
Copy link
Contributor

@andclt andclt commented May 8, 2023

Issue #, if available:
#41 #53

Description of changes:
Update dependencies and distros

Starting from [email protected], npm writes logs under the /home/.npm dir: npm/cli#4594
This is not possible inside the Lambda execution env since the fs is read-only. In earlier versions of npm, there was a bug which caused it to silently fail when unable to write cache directory: npm/cli#4996, hence why the runtime was just returning the 254 error code. There are some ways to prevent this:

  1. Setting the npm cache folder path to /tmp using a Docker ENV var:
ENV NPM_CONFIG_CACHE=/tmp/.npm
  1. Use yarn instead of npm since it fallbacks to /tmp if the preferred cache folder isn't writable
  2. Setting ENV NPM_CONFIG_CACHE=/tmp/.npm inside Lambda as an env var
  3. Run aws-lambda-ric directly using node instead of using npx
  • Testing*:
    Run integration tests locally:
make init build && make test-integ 

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@andclt andclt requested review from krk and briensea May 8, 2023 16:02
@andclt andclt closed this May 8, 2023
@andclt andclt reopened this May 9, 2023
Copy link

@krk krk left a comment

Choose a reason for hiding this comment

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

lgtm

@andclt andclt merged commit b0923e3 into aws:main May 9, 2023
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.

3 participants