awslabs / aws-greengrass-group-setup

File-driven creation of an entire AWS Greengrass group
Apache License 2.0
54 stars 23 forks source link

Issue #22: Added support for greengrass group lambda environment variables. #23

Closed dostiharise closed 4 years ago

dostiharise commented 4 years ago

Issue #22

Added support for greengrass group lambda environment variables.

Usage:

Add your environment variables to lambda_functions as follows:

{
...
    "lambda_functions": {
        "MockDevice": {
            "arn": "arn:aws:lambda:us-west-2:<account_id>:function:MockDevice:<alias>",
            "arn_qualifier": "<alias>",
            "environment_variables": {
               "<name>": "<value>",
            }
        }
    },
...
}

And then run gg_group_setup create.

And your greengrass lambda function defintion will now have the environment variables specified.

The same environment variables will also be reflected in the json config file (cfg.json) under func_defs as follows:

{
...
    func_def: {
        "environment_variables": {
               "<name>": "<value>",
        }
    }
...
}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

dostiharise commented 4 years ago

@brettf, Thanks a ton accepting the PR.

I can now point my pip's requirements.txt to master branch.