0

I need to modify the CloudFormation template : Video on Demand on AWS CloudFormation template

When I deploy the main template without any modifications and upload video in the source S3 bucket, then the folders that are getting created in the destination S3 bucket are having their names as guid of Dynamodb item as shown in the below picture,

enter image description here

enter image description here

In my case, the requirement is that those folders in the destination S3 bucket should get created with some meaningful names. To resolve this issue, where exactly do I need to modify the template

Aishwarya Joshi
  • 122
  • 1
  • 3
  • 10
  • I suspect these folders are getting created by the Function defined as CustomResource8CDCD7A7? If so, look @ the code in video-on-demand-on-aws-foundation/v1.1.0/asset2bd7f95c3e5e8fd3883dadd70adcdb14c0f67bc3bbbe8be478beef5dd78a2ae6.zip ? – Tim Bassett Mar 02 '22 at 14:52

1 Answers1

0

Steps for modifying a CloudFormation stack can be found at: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-get-template.html

In general, Stacks support passed parameters of the form:

aws cloudformation create-stack --stack-name mystack
--template-body file://mypath/mystack.json --parameters ParameterKey=KeyPairName

So one of the passed parameters could be the desired output filename.

Regarding file naming within MediaConvert, the service supports a set of time+date variables for naming output files, which can found at: https://docs.aws.amazon.com/mediaconvert/latest/ug/list-of-settings-variables-with-examples.html

Alternatively, you could rename the files after output using a Lambda Function triggered by S3 File Events. This would allow you to generate or retrieve a name conducive to your workflows, as well as set Tags and other object metadata. Examples of this workflow are documented here: https://docs.aws.amazon.com/lambda/latest/dg/with-s3-example.html

I hope this information helps you tune your workflow. Good luck!

aws-robclem
  • 324
  • 2
  • 5