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

Implementation in AWS Lambda? #31

Closed
ridvankartal opened this issue Feb 18, 2019 · 3 comments
Closed

Implementation in AWS Lambda? #31

ridvankartal opened this issue Feb 18, 2019 · 3 comments

Comments

@ridvankartal
Copy link

ridvankartal commented Feb 18, 2019

How can I implement this to AWS Lambda?

I have tried a lot of variation for NODE_ICU_DATA, I get following error:

"/var/lang/bin/node: could not initialize ICU (check NODE_ICU_DATA or --icu-data-dir parameters)"

@srl295
Copy link
Member

srl295 commented Apr 23, 2019

@ridvankartal I'm not sure (sorry for late response). But I am guessing that the paths you end up for the installed data are different than the paths expected.

@janssonav
Copy link

It's possible that the ICU .dat file (installed by full-icu) is not present in the path defined by NODE_ICU_DATA. It's also possible that the version of the ICU .dat file is you're trying to use is different from what your Lambda runtime version is using. I ran into the latter issue when upgrading the runtime version of some old lambdas (my dev environment was using node 10.0, the new lambda runtime was nodejs10.x and needed a different version of the .dat).

See: This stack overflow answer and this one

@srl295
Copy link
Member

srl295 commented Oct 10, 2019

According to nodejs/Release#483 (comment) the nodejs version can shift on lambda. I will continue the discussion there, but some comments for reference:

  • The argument to --icu-data-dir could contain both icudt64l.dat and icudt62l.dat and node will use the appropriate item.

also,

  • request your provider to build/provide node with full icu
  • request your provider to include the full-icu data in some known location
  • ideally, full-icu would be reinstalled each time the enviroment changes. I realize that's not really feasable on an environment such as lambda! But, it should be noted.

full-icu is not a "real" npm module depencency. It's kind of a hack to get the right data loaded for your version of node. AWS Lambda may not be a good use case for the full-icu module.

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

No branches or pull requests

3 participants