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개 답변
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
답변함 일 년 전
  • I cannot follow this advice because I don't have a cloudfront distribution id -- I am trying to create one, so far unsuccessfully.

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.

답변함 일 년 전
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
답변함 일 년 전
0

Have you checked other regions for CloudFront distributions?

profile pictureAWS
답변함 일 년 전
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.

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠