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

greengrass lambda does not register as a lambda environment #48

Open
stampcli opened this issue Aug 18, 2020 · 1 comment
Open

greengrass lambda does not register as a lambda environment #48

stampcli opened this issue Aug 18, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@stampcli
Copy link

stampcli commented Aug 18, 2020

The following line determines if the code is running as a lambda:

return len(get_env("AWS_LAMBDA_FUNCTION_NAME")) > 0

Unfortunately the environment variables for lambdas are not provided by greengrass' version of lambdas. This means my aws-embedded-metrics agent attempted TCL connections from my greengrass lambda and was failing until I manually added AWS_LAMBDA_FUNCTION_NAME as an env variable with the function name.

@tuncali
Copy link

tuncali commented Aug 18, 2020

In Greengrass lambda environments, MY_FUNCTION_ARN environment variable is provided by Greengrass core. Adding a check on that environment variable would fix the issue for lambda functions running in a Greengrass core.

@jaredcnance jaredcnance added the enhancement New feature or request label Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants