awslabs / aws-greengrass-group-setup

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

Functions: Cannot specify 'Pinned' value #9

Open ShaunEdiger opened 6 years ago

ShaunEdiger commented 6 years ago

As the API is currently exposed, lambda functions referenced with gg_group_setup are on-demand by default with no option to set them to pinned. I need a way to specify that a lambda function is long-lived / pinned – see create_function_definition.

I've been able hack in support by overriding GroupCommands._create_function_definition in a subclass.

After subclassing, the relevant config – "lambda_functions": { "function_name": { "arn": "function_arn", "arn_qualifier": "dev" } – is updated to look like this – "lambda_functions": { "function_name": { "arn": "function_arn", "arn_qualifier": "dev", "pinned": false }

Are there plans to expose this functionality? I can package these changes up into a PR if that's helpful.

brettf commented 6 years ago

This was originally published as a gap-fill until CloudFormation support for GG showed up. That being said, I think that would be a great addition.

ShaunEdiger commented 6 years ago

Of course, and thank you for the hard work on this project. CloudFormation support would be ideal. I'm not in the position to promise a pull request at the moment. My hope is that a contribution would be useful for at least a little while until CloudFormation support arrives.

brettf commented 6 years ago

I just made some other changes for Issue #13 and #10. So my head is back on this project (:bulb:). I will see about adding the ability to flag functions as pinned when defined in the group.

dostiharise commented 4 years ago

I have added a similar support for Functions/Environment/Variables under Pull Request #23 against Issue #22 .

You could do the same.

I can work on this if you guys still need this Issue to be resolved. Just 👍 this comment and I will know. :-)