Skip to content
This repository has been archived by the owner on Nov 24, 2018. It is now read-only.

Setting CHROMELESS_S3_OBJECT_KEY_PREFIX has no effect in lambda #349

Open
dlumma opened this issue Dec 4, 2017 · 2 comments
Open

Setting CHROMELESS_S3_OBJECT_KEY_PREFIX has no effect in lambda #349

dlumma opened this issue Dec 4, 2017 · 2 comments
Labels

Comments

@dlumma
Copy link

dlumma commented Dec 4, 2017

Hi Friends!

I am hoping to dynamically set the value of:
$CHROMELESS_S3_OBJECT_KEY_PREFIX
in the test code interacting with Chromeless running on Lambda.

So far I've had only partial luck with this. I am able to set this value and see it reflected in the name of the written screenshot to s3 when running Chromeless locally. However, when I run the same code against lambda remotely, the environment variable does not seem to carry through. (The node process instantiating Chromeless doesn't seem to send the current env vars into the object that is being built and run on lambda.) I don't want to set this value statically via the AWS console lambda configuration, as this value must change over time.

Any thoughts on how best to achieve my goal?

Apologies is this is obvious, I am new to serverless, lambda, and chromeless.

Thank you!
-Denali

@dlumma
Copy link
Author

dlumma commented Dec 4, 2017

I guess it would need to be something like a modification to the constructor to take this additional value:
https://www.npmjs.com/package/chromeless
?

@dlumma
Copy link
Author

dlumma commented Dec 5, 2017

I created this pull request which resolves the problem for me:
#351

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

No branches or pull requests

2 participants