serverless-application-model icon indicating copy to clipboard operation
serverless-application-model copied to clipboard

Allow Region to be specified in DynamoDBCrudPolicy

Open cdaley0 opened this issue 11 months ago • 1 comments

The DynamoDBCrudPolicy currently only allows the table name to be configured. The region is always assumed to be the same region as the resource being deployed. We should be able to override the region in order to easily allow e.g deploying a lambda that can access a dynamodb table in a different region like so:

"DynamoDBCrudPolicy": {
  "TableName": {
    "Ref": "MyDynamoDBTableName"
  },
  "Region": {
    "Ref": "us-west-2"
  }
}

I'm aware that I can manually copy + paste the expanded definition for DynamoDBCrudPolicy into my SAM template, but allowing the region to be specified as proposed will make things easier.

cdaley0 avatar Jan 08 '25 18:01 cdaley0

Thanks for reporting, we will investigate and then track this as a feature request.

roger-zhangg avatar Jan 24 '25 20:01 roger-zhangg