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

Using ES_AWS_FOOBAR under Lambda #13

Open
sjparkinson opened this issue May 9, 2017 · 3 comments
Open

Using ES_AWS_FOOBAR under Lambda #13

sjparkinson opened this issue May 9, 2017 · 3 comments

Comments

@sjparkinson
Copy link
Contributor

If you use this client within Lambda (or any AWS service with a role), you'll find a collision between the role's session token and the Elasticsearch credential's ID and secret.

In signed-fetch, it'll take the ID and secret from one set of credentials, then also use the session token for the role, a different credential. AWS then complains.

I'd suggest we move away from the signed-fetch dependency, implement it ourselves using aws4 in a more simple manner? Or... fix signed-fetch and just use the standard way of defining credentials (doing away with ES_*).

@sjparkinson
Copy link
Contributor Author

/cc @andygnewman

@aendra-rininsland
Copy link
Member

+1 to this. I'm trying to migrate a project that leverages n-es-client to start using Vault and it's become a very non-trivial process. Working on a PR...

@i-like-robots
Copy link
Contributor

For reference here is a signed fetch implementation used in a Lambda (but still using env vars) https://github.com/Financial-Times/n-concept-bump/blob/master/lib/signed-fetch.js

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