Server-Side Rendering Micro-Frontends in AWS
Publication date: September 9, 2022 (Diagram history)
This architecture shows how to implement server-side rendering micro-frontends in AWS using a serverless approach. Every serverless micro-frontend returns an HTML fragment (HTML-on-the-wire), and a UI composer stitches together these independent parts to create a seamless experience for users.
Server-Side Rendering Micro-Frontends in AWS
The following steps describe the architecture:
-
Amazon CloudFront serves as the entry point with two origins: an Amazon Simple Storage Service bucket and a public Application Load Balancer.
-
The Amazon S3 bucket contains all static files for the browser such as common micro-frontend dependencies, images, and CSS files. It also contains the templates the UI composer uses to place every micro-frontend on an HTML page.
-
The UI composer runs on an AWS Fargate cluster and stitches together different micro-frontends, streaming the response to improve performance. Use Amazon ElastiCache to cache micro-frontend output or entire pages for additional performance gains.
-
Use AWS Systems Manager Parameter Store to collect all micro-service endpoints. They can be HTTP endpoints or Amazon Resource Names (ARNs), decoupling team-level dependencies.
-
A serverless micro-frontend uses AWS Lambda and Amazon DynamoDB to store data and render an HTML fragment ready for embedding in the UI composer template.
-
For third-party micro-frontends, use Amazon API Gateway to validate tokens or API keys, ensuring only your application can access that endpoint.
-
Use AWS Step Functions Express as a low-code solution for generating micro-frontends. Step Functions integrates with over 200 services to reduce computation, retrieves data from DynamoDB natively, and delegates rendering to a Lambda function.
Further reading
For additional information, refer to the following resources:
Diagram history
To be notified about updates to this reference architecture diagram, subscribe to the RSS feed.
| Change | Description | Date |
|---|---|---|
Initial publication | Reference architecture diagram first published. | September 9, 2022 |
Note
To subscribe to RSS updates, you must have an RSS plugin enabled for the browser you are using.