r/aws•
borg88

Amplify static site resources

technical question

I have a static site, literally just a bunch of HTML, PNG, files and a CSS file. Up until now I have been hosting on an old style shared host. I've also had it running on a basic LAMP stack on a DigitalOcean droplet.

There are quite a few files, many in subdirectories.

I have tried to get it running on Amplify, naively thinking I could just upload all the files and it would work.

I can navigate the pages in the site, but it is not picking up any of the CSS or image files. So each page displays unstyled text and all the images are broken.

I think that I may have to put the images and CSS on S3 storage, but I've not really been able to find anything that explains this.

Any pointers?

Posted Nov 5, 2022, 5:30 PM UTC

12
notsoscarydino•

Amplify internally is using S3 only.

Most likely it is an issue with path of css files. Try running the static files locally and see if css files are being picked up.

1
borg88OP•

It works fine locally, I build and test the static files before uploading them to shared hosting.

I read something somewhere that seemed to suggest resource files need to be handled differently to HTML files in some way, but it wasn't clear what it meant.

If I can't find a solution I might give GCP a try.

1