aws / aws/chalice

"The domain name you provided already exists" Continuous Deployment (CD) + Custom Domain Names

Open
#1,852 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11.1k
Forks
1k
Avg merge
1d 22h
Merged PRs (30d)
2

Description

After following both the [Continuous Deployment (CD)](https://aws.github.io/chalice/topics/cd.html) and [Custom Domain Names](https://aws.github.io/chalice/topics/domainname.html) guides in the documentations. I'm not able to deploy by pushing to Github. The Beta stage is created but it fails with the message:

> "The domain name you provided already exists"

Long version:

```
Logical ID: ApiGatewayCustomDomain
Status: CREATE_FAILED
Status Reason: Resource handler returned message: "The domain name you provided already exists. (Service: ApiGateway, Status Code: 400, Request ID: a1f7ccd0-706f-4276-b5d2-a678276c793b, Extended Request ID: null)" (RequestToken: d5adf486-d4a1-721c-de04-c1bda238ee7d, HandlerErrorCode: AlreadyExists)
```

For clarification, I was able to properly deploy my app with the custom domain using `chalice deploy`, it's only when I push to Github and that triggers the cloud formation deploy that it fails, because the beta app is trying to use the same domain I'm already using. Is there a way to have this two "stages" use different domains?

![image](https://user-images.githubusercontent.com/727774/145682040-110464e8-c4a9-42c3-b1ef-b5583dd23f32.png)

Contributor guide

Open the contributing guide

Research direction

Compare the Continuous Deployment and Custom Domain Names guides, then inspect the generated CloudFormation resource identified as ApiGatewayCustomDomain and the stage/domain configuration used by chalice deploy. Done means the GitHub-triggered deployment succeeds without the AlreadyExists error and the Beta and deployed stages can use distinct domains.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, github, python
Domain
api, cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.