Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
The DynamoDB DescribeTable operation treats the current queried table as a replica.
$ awslocal dynamodb describe-table --table-name global01 --query 'Table.Replicas' --region us-west-1
[
{
"RegionName": "ap-south-1",
"ReplicaStatus": "ACTIVE"
},
{
"RegionName": "eu-central-1",
"ReplicaStatus": "ACTIVE"
},
{
"RegionName": "us-west-1", # <<< THIS MUST NOT BE RETURNED
"ReplicaStatus": "ACTIVE" # <<<
}
]
Expected Behavior
The correct response should be like so:
$ awslocal dynamodb describe-table --table-name global01 --query 'Table.Replicas' --region us-west-1
[
{
"RegionName": "ap-south-1",
"ReplicaStatus": "ACTIVE"
},
{
"RegionName": "eu-central-1",
"ReplicaStatus": "ACTIVE"
}
]
How are you starting LocalStack?
With a docker-compose file
Steps To Reproduce
How are you starting localstack (e.g., bin/localstack
command, arguments, or docker-compose.yml
)
docker run localstack/localstack
Environment
- OS: Ubuntu 22.04
- LocalStack: latest
Anything else?
Localstack maintains a single copy of a global table rather than truly replicating it. Requests are forwarded to the region where the table exists. On the receiving region, it is not possible to know the originating region. This is a technical limitation which will be solvable once the new internal AWS client is stable, see #7240. Here it will be possible to use the DTO to determine the origin region.