Closed vijaymentor closed 3 years ago
I need some more information. The bucket url 'http://bucket-name.s3-website-eu-west-1.amazonaws.com' seems to be wrong I got
Code: IncorrectEndpoint
Message: The specified bucket exists in another region. Please direct requests to the specified endpoint.
Endpoint: bucket-name.s3-website-us-east-1.amazonaws.com
further more bucket url format should be like 'https://s3.eu-west-1.amazonaws.com/data.openspending.org' in your case probably 'https://s3.us-east-1.amazonaws.com/bucket-name'
the bucketUrl
should return an xml document with <ListBucketResult>
as root element, see 'https://s3.eu-west-1.amazonaws.com/data.openspending.org'
actual bucket name is http://dgenv-website1.s3-website-eu-west-1.amazonaws.com/ (this is the name i got when i enabled the static website hosting in s3 bucket properties).I have attached the static website dns name screenshot also from s3 bucket properties.
here i have attached the index.html file in index.zip file format. please help me what i am doing wrong here
change bucketUrl
to https://s3.eu-west-1.amazonaws.com/dgenv-website
bucket name is dgenv-website1 so shall i put like below
https://s3.eu-west-1.amazonaws.com/dgenv-website1
?
yes that would work.
I also added a feature to handle those website se3 bucket addresses out of the box. Just leave bucketUrl
undefined and it should work as well.
Try grep the latest version.
Now this below s3 bucket url is working
http://dgenv-website.s3-website-eu-west-1.amazonaws.com/
However if i access actual domain name https://env.dataplatform.tech.ec.europa.eu/ then always calling wrong url
Bucket: https://s3.eu-west-1.amazonaws.com/dgenv-website
can you help me on this
this is because of your CORS setup, see CORS Configuration in README
set AllowedOrigins to your hosting domain in your case https://env.dataplatform.tech.ec.europa.eu
[ { "AllowedHeaders": [ "*" ], "AllowedMethods": [ "GET" ], "AllowedOrigins": [ "https://env.dataplatform.tech.ec.europa.eu/" ], "ExposeHeaders": [ "x-amz-server-side-encryption", "x-amz-request-id", "x-amz-id-2" ], "MaxAgeSeconds": 3000 } ]
I have implemented the above CORS rule in the s3 bucket permission.Still whenever i access the https://env.dataplatform.tech.ec.europa.eu/ and it is trying to access wrong S3 bucket below url
wrong url - Bucket: https://s3.eu-west-1.amazonaws.com/dgenv-website
correct url - http://dgenv-website.s3-website-eu-west-1.amazonaws.com
i think index.html is still working old S3 bucket name format.Can you please check and advise me
'https://s3.eu-west-1.amazonaws.com/dgenv-website' <- this url is your bucket url, it is the right one. Just open it in the browser and you will see that you get the expected xml response.
I get a 404 when I open https://env.dataplatform.tech.ec.europa.eu/index.html. May you can give me the right address to you bucket browser html
do you need any further support?
in index.html file after replaced the following line also
bucketUrl: 'http://bucket-name.s3-website-eu-west-1.amazonaws.com'
please help on where i am missing it.