This Guidance helps shoppers save time during their shopping experience by having their orders ready for pickup in a secure locker. Shoppers simply purchase their desired item(s) through an online channel, wait a short time for the order to be fulfilled, then receive a notification once the order is ready for pickup in a locker. Lockers are accessible through a one-time use passcode. Shoppers will no longer have to wait in line to get their items and can shop on their own schedule.
Architecture Diagram
Step 1
The order ready event containing locker information is published to Amazon EventBridge.
Step 2
The AWS Lambda function subscribes to the order ready event.
Step 3
The Lambda function calls the Amazon API Gateway backed by another Lambda function, which retrieves a one-time use passcode from Amazon DynamoDB.
Step 4
The initial Lambda function uses Amazon Simple Notification Service (Amazon SNS) to notify the shopper that their order is ready for pickup.
Step 5
Amazon SNS sends a push notification or SMS message to the shopper’s mobile device that includes a link with the one-time use passcode to open the locker(s).
Step 6
When the shopper arrives at the locker, they confirm the one-time use passcode.
Step 7
Lambda sends an order pickup event to EventBridge.
Step 8
Another Lambda function is subscribed to this event. This Lambda function looks up the locker(s) for the shopper, then sends the event to AWS IoT Core.
Step 9
AWS IoT Core sends a message to open the shopper’s locker(s).
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 gives you near real-time visibility into access, errors, and logs, so you can respond to incidents and events before they become issues to the architecture’s functionality.
-
Security
Resources have tightly scoped AWS Identity and Access Management (IAM) roles attached to them which permits only the required services to communicate with each other. Additionally, data at rest stored in DynamoDB is encrypted with AWS Key Management Service (AWS KMS). Data in transit is encrypted with transport layer security (TLS).
-
Reliability
Amazon CloudWatch automatically collects logs and metrics, which you can use to create custom alerts about service performance. DynamoDB backup and restore handles data backup and recovery. You can configure these backups to be either on demand or point-in-time continuous backups.
-
Performance Efficiency
This Guidance is flexible, allowing you to customize your implementation. For example, some lockers may not support message queuing telemetry transport (MQQT), but AWS IoT Core allows communication over alternate protocols.
-
Cost Optimization
All components in this Guidance, such as Lambda functions, DynamoDB, EventBridge, and API Gateway, are serverless and have built-in autoscaling. This helps you save on costs because there are no servers for you to manage, and you will only pay for the exact resources you use.
-
Sustainability
The managed services and services with built-in autoscaling handle resources efficiently. These services scale to match demand to allow for minimum resource consumption.
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.
References to third-party services or organizations in this Guidance do not imply an endorsement, sponsorship, or affiliation between Amazon or AWS and the third party. Guidance from AWS is a technical starting point, and you can customize your integration with third-party services when you deploy the architecture.