简体   繁体   中英

Using AWS S3 for Angular SSR storage

I am looking into using S3 as part of my serverless environment with Lambda and some others.

I really, really need SEO (so slugs and SSR) and will use ng add @nguniversal/express-engine in the Angular 13+ app.

How does the SSR work if it gets pushed to S3? Like suppose I had a question and answer site like this site and wanted each "page" of a question with answers to be a URL slug and be part of SSR for SEO.

I need help understanding how SSR works and how to create URL slugs I can send to the sitemap?

New to this type of environmeent and angular but my question "page" willbe a basic component.

For Angular SSR to work it require Node environment according to this documentation: https://angular.io/guide/universal

You have to start the application using commands like npm run dev:ssr This is not possible with S3 setup. You need a Compute resource for this to work. You have following options:

  • EC2 instance with application installed on it
  • Elastic Beanstalk
  • ECS + Fargate / EC2 (Dockerised setup) good for long term production setup
  • Maybe on Lambda (depends on the site)

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