awslabs / amplify-video

An open source Category Plugin for the AWS Amplify-CLI that makes it easy to deploy live and file based streaming video services and integrate them into your Amplify applications.
https://www.npmjs.com/package/amplify-category-video
Apache License 2.0
267 stars 56 forks source link

Custom lambda - Add Environment Variables #298

Closed conorw closed 2 years ago

conorw commented 2 years ago

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: https://github.com/awslabs/amplify-video/issues/161#issuecomment-819817188

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

wizage commented 2 years ago

Merged in