This Guidance helps you offer personalized experiences and interactions to shoppers through machine learning (ML) services, so you can increase revenue and sales. The Guidance provides a fully automated, end-to-end architecture that ingests data and trains ML models. Additionally, this architecture provides APIs for adding near real time personalized product recommendations to digital commerce mobile applications and portals.
Architecture Diagram
Step 1
Retrieve product metadata through endpoints and pull training datasets from your data source. This architecture is designed to be compatible with any e-commerce backend.
Step 2
Amazon Athena Federated Query provides a mechanism to fetch data from different sources, such as relational and non-relational databases, object stores, and custom data sources. It then stores the results in Amazon Simple Storage Service (Amazon S3).
Step 3
Amazon S3 stores datasets used to train Amazon Personalize models in addition to partial datasets for updating new stock keeping units (SKUs) and user metadata.
Step 4
Amazon Personalize delivers near real time and batch product recommendations based on customer interactions and behaviors.
Step 5
AWS AppSync provides clients with GraphQL endpoints to store user interactions and get product recommendations combined with metadata from Amazon DynamoDB.
Step 6
Amazon Elastic Container Service (Amazon ECS) on AWS Fargate runs microservices used to apply business logic for A/B testing and to create new campaigns.
Step 7
DynamoDB acts as a caching layer between the e-commerce backend and the recommendation microservice, providing a scalable way to fetch product metadata.
Step 8
Amazon EventBridge responds to changes in Amazon Personalize campaigns and filters, resolves, and triggers events that activate workflow operations and notifications.
Step 9
AWS Step Functions orchestrates workflows for model retraining, job imports, and updates to the DynamoDB table and machine learning operations (MLOps).
Step 10
The Amazon Pinpoint campaign sends scheduled messages with recommendations through email and text.
Step 11
Amazon CloudWatch, AWS Key Management Service (AWS KMS), and AWS Identity and Access Management (IAM) secure the workload and provide governance.
Well-Architected Pillars
The AWS Well-Architected Framework helps you understand the pros and cons of the decisions you make when building systems in the cloud. The six pillars of the Framework allow you to learn architectural best practices for designing and operating reliable, secure, efficient, cost-effective, and sustainable systems. Using the AWS Well-Architected Tool, available at no charge in the AWS Management Console, you can review your workloads against these best practices by answering a set of questions for each pillar.
The architecture diagram above is an example of a Solution created with Well-Architected best practices in mind. To be fully Well-Architected, you should follow as many Well-Architected best practices as possible.
-
Operational Excellence
This Guidance is designed to be fully scalable and automated. The serverless architecture does not require human intervention to run MLOps and an ML lifecycle. You can enable CloudWatch logging and metrics on supported services to monitor usage and failures.
-
Security
This architecture uses IAM policy best practices, such as least privilege access to resources. For example, when using the DynamoDB resolver, this architecture employs IAM roles that provide the most restrictive view to resources, such as your DynamoDB tables.
-
Reliability
This architecture uses serverless and managed services such as Amazon S3, Step Functions, and DynamoDB. These services automatically recover from failures, scale to increase workload availability, and provision resources based on demand.
-
Performance Efficiency
This architecture scales to meet performance requirements for high capacity events, such as Prime Day or Black Friday. When Amazon Personalize returns recommended SKUs during these events, the e-commerce application needs to obtain the right metadata. DynamoDB and Amazon DynamoDB Accelerator (DAX) retrieve metadata from recommended SKUs and returns responses within microseconds.
-
Cost Optimization
With serverless and managed services in this architecture, you pay only for the computing resources required to run your workloads. Additionally, Lambda, AWS AppSync, and Step Functions remove the operational burden of managing both operating systems and instances to run code.
-
Sustainability
This architecture reduces the amount of resources consumed by using serverless services that automatically scale based on demand.
Implementation Resources
A detailed guide is provided to experiment and use within your AWS account. Each stage of building the Guidance, including deployment, usage, and cleanup, is examined to prepare it for deployment.
The sample code is a starting point. It is industry validated, prescriptive but not definitive, and a peek under the hood to help you begin.
Related Content
Disclaimer
The sample code; software libraries; command line tools; proofs of concept; templates; or other related technology (including any of the foregoing that are provided by our personnel) is provided to you as AWS Content under the AWS Customer Agreement, or the relevant written agreement between you and AWS (whichever applies). You should not use this AWS Content in your production accounts, or on production or other critical data. You are responsible for testing, securing, and optimizing the AWS Content, such as sample code, as appropriate for production grade use based on your specific quality control practices and standards. Deploying AWS Content may incur AWS charges for creating or using AWS chargeable resources, such as running Amazon EC2 instances or using Amazon S3 storage.