Closed quetzalsly closed 2 years ago
Not sure about AWS specific services, but conceptually only the initial navigate request needs to be served by a "dynamic function" that takes into account the user agent string. For example, we have instructions for how to deploy to Firebase Functions (dynamic) and Firebase Hosting (static), and basically the only files that the dynamic function needs are build/polymer.json
, build/**/index.html
, and build/**/push-manifest.json
. This can be summed up as follows:
Request URL | Server |
---|---|
https://pwa-starter-kit.appspot.com/ | dynamic function that runs prpl-server |
https://pwa-starter-kit.appspot.com/**/src/components/my-app.js | static file server |
https://pwa-starter-kit.appspot.com/**/src/components/my-view1.js | static file server |
... | static file server |
where **
is the build name selected by prpl-server
Conceptually this "dynamic function" can be a serverless thing, so thinking https://aws.amazon.com/serverless/ or AWS Lambda could fill that role (but again, I'm not familiar with AWS offerings so that might not be the right info).
I was just wondering if prpl-server could somehow be used with aws, I had an idea of using s3 bucket to serve a static site, cloudfront being used as a cdn for assets. I could have 5 different build types on the s3 and a client would receive the one they need based on the browser they use. I am just not sure if prpl-server could be used in such an architecture. S3 + CloudFront + Route 53 + API Gateway + DynamoDB is what I was thinking. Does anyone have any ideas?