Old S3 and CloudFront assets are gone but causing issues

0

Quite some time ago I created a static website using S3, CloudFront, Certificate Manager and Route 53. I needed to make a change and all of these assets are no longer listed when I log into my console. I'm using a root account so it's not permissions.

FinallyI decided just to rebuild the instances but as I try to associate the certificates, associate with CloudFront and update DNS I'm getting conflict errors. As an example if I try to associate my new CloudFront instance to a www CNAME I get "One or more of the CNAMEs you provided are already associated with a different resource." What am I to do? I somehow need my old distribution (d3s67m8gw85ues.cloudfront.net) which I can't see in my instance to become visible to me.

Any help, insight appreciated.

5 Answers
0

Hi,

There has to be a cloudfront-distribution somewhere with the cname configured.

I would suggest to check out the following article and try the suggested steps: https://aws.amazon.com/de/premiumsupport/knowledge-center/resolve-cnamealreadyexists-error/

If you don't know the distribution ID, use the ListConflictingAliases CloudFront API to find partial information about the distribution and the account ID for the conflicting CNAME alias. Then, use AssociateAlias API to move your CNAME from existing distribution (source distribution) to the new distribution (Target distribution). Choose one of the following resolutions based on your scenario:

If your source and target distributions are in the same account, then complete the steps in the Use the AssociateAlias API to move your CNAME section.
If your source and target distributions are in different AWS accounts, then complete the steps in the Deactivate source distribution with the conflicting CNAME section.
If your source and target distributions are in different AWS accounts, and the source distribution can't be deactivated because of downtime to existing traffic, then complete the steps in the Use wildcard to move the alternate domain name section.
profile picture
HeikoMR
answered 17 days ago
0

Thank you for the input. Using the console was something I had not thought of to ensure I could see everything. Via the console if I list out my S3 buckets, the CloudFront distributions and the certificate manager entries I still only see the new S3 bucket, new CloudFront distribution and certificates which I created today. Hence I still don't see the existing distribution which is causing the conflict. This is all a bit crazy considering I simply need to edit one item within an S3 bucket which I can't see.

answered 17 days ago
0

Strange, it has to be somewhere.

Did you try the following command replacing distribution-id with your new cloudfront-distribution and the alias with the CNAME?: $ aws cloudfront list-conflicting-aliases --distribution-id YourDistributionID --alias YourCNAME

Are you sure that you deployed your original resources in this specific account? Did you use once an api gateway with that domainname? That will create a cloudfront distribution not visible in console (not sure about cli tho, but you could check it out).

You could also try to navigate into the "Resource Groups & Tag Editor" Service -> Tag Editor -> Select Regions = All;Resource Types = AWS::CloudFront::Distribution and then start a search.

profile picture
HeikoMR
answered 17 days ago
0

Have you checked other regions for CloudFront distributions?

profile picture
answered 17 days ago
0

Thanks all for the input. I do run one other AWS instance but nothing that I am trying to do is within that instance. I have no cloudfront distributions over there so I'm fairly certain this is not setup somewhere else.

I really think the error "One or more of the CNAMEs you provided are already associated with a different resource" means that the issue is within my current instance since I can't imagine it's looking across AWS instances. Again, what I see in the console and what I see via the AWS cli are the same and the only buckets and cloudfront distributions I see are what I created a few days ago. Time to move on and there are other ways I can build a simple, static site.

answered 11 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions