I am trying to create a repo where I create (IaC) all of my AWS DynamoDB Tables and their associated CRUD API’s.
Each Table has it’s own stack that creates the table and sets up the APIGatewayV1 API’s and sets the handlers. I have set the API to use custom domain. We have a domain already set up in Route53 for our web pages “mydomain.co.uk” and I set the custom domain to be that prefixed with “api”.
This has ll been working fine in my first table (DBMktPref).
Now I add a second table which is in separate stack but mostly a straight copy of the above table and I get an error:
CREATE_FAILED | AWS::ApiGateway::DomainName | ApiSftpRecLogDomainName2F9FFEC4 | api.mydomainname.co.uk already exists in stack arn:aws:cloudformation:eu-west-1:636076030592:stack/nonprod-b2bgifting-gate-database-DbMktPref/aa5db410-0534-11ee-abc8-06b416a60bfb
Can anyone help me with what code I need to pull in an existing custom domain please?