Depaa / amplify-sveltekit

Amplify Auth with Sveltekit
GNU General Public License v3.0
3 stars 2 forks source link

AWS Amplify #5

Open marksteven opened 1 year ago

marksteven commented 1 year ago

Hi Matteo, Firstly thank you for this tutorial I read and built your AWS auth svelte project and it made sense. Loading it is another story.

Was wondering if you have a project somewhere that is simply a template sveltekit that actually goes up onto AWS Amplify without errors.

Have attempted a number of times and it fails each time. Tried via GitHub and Amplify CLI Both go up fine and even say they were successful but clicking on the url link you get one of these after page loads. AccessDeniedAccess DeniedXKMV5Q83Z8XSE4GAJmAsfb554Uqc5YAEPE2CcTJEyaTqce2ZoS8UkufrtX2I9/rzkeq9S3WyNpM+UjrV741ompGKdjU=

AWS engineers have not been able to work out why so at a loss.

So a short tutorial showing. simple page going up via CLI or Github would be great if you can

cheers Mark

Depaa commented 1 year ago

Hi Mark, I really appreciate you read my blogpost. I think I know your problem but I have never publish anything to Amplify.

Are you trying to deploy a static Single Page Application (SPA)? If yes I did it with S3 and Cloudfront, you can check this blogpost https://medium.com/@depascalematteo/building-static-backoffice-on-aws-with-sveltekit-11937a2d13c

I think your problem could be something about the entry path, I did solve it by creating a redirect with cloudfront: when AccessDenied error pop up, then return 200 and index.html

Hope this can help Matteo

marksteven commented 1 year ago

Hi Matteo, Thanks for the reply. I did get it finally working after much much mucking around and the combination appears to be to make sure you use svelte static site plugin not the auto shipped one. Plus make sure the build (in amplify) is done correctly so that it points to the right entry point as you suggested. Now my mission is to try to replicate what you had done with S3 and cloudfront with what I've built as I would like to complete your project. Cheers Mark