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 v1xxxxx.cloudfront.net
points v1mydomain.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
pointsxxxxxx.cloudfront.net
cloudfront
domainxxxxxx.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 oncreate 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
Post a Comment