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

Configuration files with .json extension might be copied before sent it to s3. #35

Open
brq-cr opened this issue Sep 9, 2017 · 1 comment

Comments

@brq-cr
Copy link

brq-cr commented Sep 9, 2017

.key (googleCloud) or .json config files might be copied after compile code process. Otherwise Lambda returns a module error b/c file isn't there.

Use example -------

const visionApi = googleVision({ projectId: 'awesome-project-168122', keyFilename: './my-service-accout.json', });
Error example -----------

Unable to import module 'handler': Error
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/var/task/node_modules/grpc/src/node/src/grpc_extension.js:30:15)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

@brq-cr brq-cr changed the title Configuration files with .json extension should be copied before sent it to s3. Configuration files with .json extension might be copied before sent it to s3. Sep 9, 2017
@brq-cr
Copy link
Author

brq-cr commented Sep 10, 2017

My bad the issue described above is related to google vision library. But it still being a good idea copy those .json files to allow configuration files.

I fixed it temporally using this solution here:
https://stackoverflow.com/questions/40032758/aws-lambda-w-google-vision-api-throwing-pem-read-biono-start-line-or-errnoen

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

1 participant