How to add FilterCriteria to a DynamoDB Stream CloudFormation template created by AWS Amplify?

132 Views Asked by At

Using the AWS Amplify CLI to create a Lambda trigger for a DynamoDB Table Stream. The documentation provided by Amazon is working as expected. However, I'm wanting to add filter criteria to the stream configuration. Amplify generates a CloudFormation template file. But, changes to this file will be overwritten with a future "push".

{
  ...
  "LambdaEventSourceMappingName": {
    ...
    "Properties": {
      ...
+     "FilterCriteria": {
+       "Filters": [
+         ...
+       ]
+     }
    }
  }
  ...
}

Is there a way that I can add/overwrite attributes to a CloudFormation template generated by Amplify? Can this be done with Amplify's Custom Resources?

1

There are 1 best solutions below

1
mkaya387 On

Once you are edited cloudformation template in amplify/backend/function/yourFunction/yourFunction-cloudformation-template.json you need to amplify env checkout dev (change dev with your environment name) before amplify push