awslabs/amplify-video

Custom lambda - Add Environment Variables

conorw opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
I am currently successfully using VOD custom functions to add a row into dynamodb when a media job has finished.
I am using the following instructions:
#161 (comment)

However, in the 'MediaConvertStatusLambda' function I require the 'env' and 'GraphQLAPIId' vales in order to determine the dynamdb table I wish to insert into.

Even though I am using a custom 'SnsSetup.template' file, I cannot populate these environment vars into the lambda function as the generated '*-vod-workflow-template.yml' file does not specify these parameters for the 'rSnsInvokeLambdaSetup' function.

Describe the solution you'd like
When the '*-vod-workflow-template.yml' is generated, add the env, GraphQLAPIId & GraphQLEndpoint parameters to the 'rSnsInvokeLambdaSetup' definition.

Describe alternatives you've considered
I have tried to override the '*-vod-workflow-template.yml', but it ignores the copy that I place in the custom folder.

Additional context

Merged in