简体   繁体   中英

s3 cloudfront app Code: NoSuchKey on refreshing

I have my angular2 webapp hosted in s3. it has cloudfront as well. Its connecting to nodejs as backend which is in different machine in AWS EBS.

My web application works fine.But when i refresh any page , its throwing 404 Not Found with the below message.

Code: NoSuchKey
Message: The specified key does not exist.
Key: user/adduser/edit
RequestId: CA306FFABB30FB75
HostId: WAp7/BZMHH0UpE3z2dJLJT4gqEwv7u/LKbFTUuHH86lRyReLXvODLgTuTw+3emnTJ3jDj2VpiYo=

Can you help to resolve this?

I am not sure if its the correct thing to do.But it fixed my issue. I configured s3 404 redirection url to be my index.html.ie pointed my 404 redirection to index.html itself. It worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM