aws-amplify / aws-amplify/amplify-hosting

Stale domain association for deleted app blocks new app - allisterevents.okaywinston.com

Open
#4,093 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

## Issue

A domain association for a **deleted** Amplify app is blocking a new app from claiming the same subdomain.

**Account:** 026090538781
**Region:** us-east-1
**Subdomain:** `allisterevents.okaywinston.com`
**New App ID:** `d24nyugd8w0wp3`

## Steps to reproduce

1. Had an Amplify app with domain association for `allisterevents.okaywinston.com`
2. Deleted the app
3. Created new app `d24nyugd8w0wp3`
4. Tried `aws amplify create-domain-association --app-id d24nyugd8w0wp3 --domain-name okaywinston.com --sub-domain-settings '[{"prefix":"allisterevents","branchName":"main"}]'`

## Error

```
BadRequestException: One or more domains requested are already associated with another Amplify app: allisterevents.okaywinston.com
```

Also blocked at CloudFront level: `CNAMEAlreadyExists` when attempting to create a CloudFront distribution with this CNAME alias, even though the old CloudFront distribution (`d2fb89kwqcfdsw.cloudfront.net`) is no longer in our account.

## Expected behavior

Deleting an Amplify app should release its domain associations so they can be used with new apps.

## Workaround

Using `events.okaywinston.com` as a different subdomain for now.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported AWS Amplify create-domain-association command in us-east-1 with app d24nyugd8w0wp3 and the allisterevents prefix. Check whether the deleted association and CloudFront alias still block the request; done means the new app can claim allisterevents.okaywinston.com without the reported errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.