By using AWS re:Post, you agree to the Terms of Use


Serverless is a way to describe the services, practices, and strategies that enable you to build more agile applications so you can innovate and respond to change faster. With serverless computing, infrastructure management tasks like capacity provisioning and patching are handled by AWS, so you can focus on only writing code that serves your customers.

Recent questions

see all

How to configure record set for a custom domain name for a multi region api gateway?

I have created a hosted zone (resource type AWS::Route53::HostedZone) in aws with a custom domain name (example - ``` customDomain: Type: AWS::Route53::HostedZone Properties: Name: '' ``` now i'm creating an api to be deployed to two regions, by deploying stack below to two regions. when i deploy stack below in one region everything works fine , but when i deploy the same stack in a second region , i get the error message, create failed for Mycustomdomainconfig => "The domain name you provided already exists. (service: ApiGateway, ...Status Code 400... i'm trying to use same custom domain name for both api gateway endpoints deployed in two regions. can anyone see what i'm doing wrong here? ``` Resources: MyCertificate: Type: "AWS::CertificateManager::Certificate" Properties: DomainName: ValidationMethod: DNS DomainValidationOptions: - DomainName: '' HostedZoneId: 'afnqrejxyi' Myrecord: Type: AWS::Route53::RecordSet Properties: Region: !Ref aws_region SetIdentifier: !Sub "endpoint-${aws_region}" HostedZoneId: 'afnqrejxyi' Name: '' Type: A AliasTarget: DNSname: !GetAtt Mycustomdomainconfig.RegionalDomainName HostedZoneId: !GetAtt Mycustomdomainconfig.RegionalHostedZoneId Mycustomdomainconfig: Type: AWS::ApiGateway::DomainName Properties: RegionalCertificationArn: !Ref MyCertificate DomainName: '' ... MyApiMapping: Type: AWS::ApiGateway::BasePathMapping Properties: DomainName: !Ref Mycustomdomainconfig RestApiId: !Ref MyApi ... MyApi: Type: AWS::Serverless::Api Properties: .... ```
asked 2 days ago

Popular users

see all

Learn AWS faster by following popular topics