Closed Dellybro closed 3 years ago
As you noticed, the batch operations, by their nature, target multiple DynamoDb tables so the way to implement batching would be to reference the different table names in the resolver mapping templates.
If your mapping templates are embedded in the cloud formation template, you can use string join operations and reference the DynamoDb table names as a workaround. Since you're not using inline templates, the only workaround I can think at this point is when you upload your vtl files to S3 to scan them and replace the DynamoDb table placeholders.
Within my cloud formation template I have all the resolvers for my appsync client but for my many to many relationship i'm going to need to do a batchput / batchget, my question is how do i get the table name within my response vtl as an environment variable?
My .vtl's are their own file which end up in an s3 location after pushing it through my pipeline so i'm trying to not use the inline style which i know is possible to do what i'm asking for, but i'd prefer to separate my yaml resource from my .vtls