amazon web services - cloudfront points to old version of React hosted on s3 -


i have deployed react app on s3. using cloudfront use certificate , reach s3 bucket through https. after struggling setting up, managed set up, working well.

now updated project, created new version of bundle.js, uploaded s3.

my issue mydomain.com points v1 of bundle.js

so tried dig little bit more, , here found:

  • mydomain.com points v1
  • xxxxx.cloudfront.net points v1
  • mydomain.com.s3-website-eu-west-1.amazonaws.com points v2

so guess reason, cloudfront points v1, why ? there cache somewhere in there ?

here config, in case helps:

  • route53 type a points xxxxxx.cloudfront.net
  • cloudfront domain xxxxxx.cloudfront.net
  • cloudfront cnames mydomain.com , www.mydomain.com
  • cloudfront origin domain name , path mydomain.com.s3-website-eu-west-1.amazonaws.com
  • s3 bucket mydomain.com

ps : double check issue not coming bundle.js, deleted background image bucket, somehow, still found , used when accessing mydomain.com (so showing v1)

as @joe clay confirmed, cloudfront caching everything.

to force clear cache using aws console (i found in docs can done using api), here steps followed:

  • log in aws console
  • go cloudfront , see details of distribution
  • go invalidations tab, , click on create invalidation
  • put in object path * , save
  • (took 5 minutes complete)
  • refresh website mydomain.com (might need clean browser cache)
  • and voila !

hope answer can stuck same problem!


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -