Reduce fuel costs and improve logistics operations with a route optimization tool
This Guidance provides a fleet planning tool for route optimization and tracking, helping you optimize orders, reduce costs, and improve your fleet and delivery operations. It is a cloud-based solution that combines historical data, such as traffic, routes, and customer data, with location services, such as route planning, near real-time tracking, geocoding, and analytics. It helps you better manage the distinct categories of deliveries (discrete, non-discrete, and instant deliveries), with a flexible tool to handle multiple vehicle types (such as trucks, scooters, and bikes). A web-based dispatcher interface for planning and monitoring, with a mobile driver application for navigation and proof of delivery, is also implemented with this Guidance.
Please note: [Disclaimer]
Architecture Diagram
[text]
Step 1
Users access the application through a web-based UI that uses AWS Amplify libraries to connect to AWS.
Step 2
Amplify allows the application to display interactive maps, autocomplete addresses, and place markers by connecting with Amazon Location Service.
Step 3
The application connects to the AWS Cloud through AWS AppSync, which acts as a central hub to interact with other AWS resources.
Step 4
Itineraries are stored in Amazon DynamoDB, where the application can query and update them with single-digit millisecond performance.
Step 5
Itineraries are optimized using Amazon Location Route Matrix API. This API returns a matrix with the distance between each pair of points of the itinerary. The matrix is then used to optimize the route based on the shortest distance between each pair of waypoints.
Step 6
Once an itinerary starts, an asset outfitted with an Internet of Things (IoT) sensor sends position updates to AWS IoT Core using the message queuing telemetry transport (MQTT) protocol.
Step 7
AWS IoT Core routes the messages to a Location Service Tracker, which stores the position updates for up to 30 days.
Step 8
Users of the application can track the assets on the map in near real-time. This is achieved by polling the updates from the Amazon Location tracker through an AWS Lambda custom AWS AppSync resolver.
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 can be deployed using the Amplify command line interface (CLI). This means that all infrastructure components are expressed as infrastructure as code (IaC) so you can easily deploy changes and adapt this to enhance your operational excellence. Additionally, all of the Lambda functions in this Guidance are instrumented to emit JSON structured logs through the usage of AWS Lambda Powertools for TypeScript. This allows operators to aggregate and query logs, as well as extract metrics and set alarms.
-
Security
The backend of this Guidance has two entry points: an AWS AppSync API and an AWS IoT Core endpoint. The first leverages an Amazon Cognito user Pools where you can create groups that users belong to. The AWS IoT Core endpoint instead uses X.509 client certificates that are issued and managed by AWS IoT Core. Finally, the frontend application also uses Cognito, both for storing users (user pool), and for obtaining temporary credentials (identity pool).
-
Reliability
This Guidance uses AWS managed services for all of its public endpoints (AWS AppSync and AWS IoT Core), which allows the Guidance to be highly available. You can also deploy the frontend with both AWS Amplify Hosting or Amazon Simple Storage Service (Amazon S3) coupled with Amazon CloudFront, both of which will make it globally distributed and highly available.
-
Performance Efficiency
AWS IoT Core, AWS AppSync, Lambda, and Amazon Location are purpose-built services for this Guidance that enhance your performance efficiency. AWS IoT Core is a managed service that accepts connections from IoT devices, using industry standards for authentication (TLS) and connection protocols (MQTT). AWS AppSync was chosen as a managed service that allows you to expose APIs to web and mobile applications and allows you to request only the right amount of data (using GraphQL). Lambda was chosen because of its serverless and managed nature, that allows it to scale up and down based on traffic. Finally, Amazon Location was chosen as a secure and cost-effective mean to access location-based data from multiple vetted providers. This Guidance can be deployed in any of the AWS commercial Regions where these services are supported.
-
Cost Optimization
This Guidance uses pay-as-you-go billing for all services, and scales to continually match your demand with only the minimum resources required. You can also opt into Compute Saving Plans to materialize cost savings on Lambda, which is used extensively throughout this Guidance.
-
Sustainability
This Guidance uses event-driven processing that relies on ephemeral compute environments (Lambda) and managed services for the entry points (AWS AppSync and AWS IoT Core), allowing this Guidance to be elastic and scale in function of the load. Managed services shift responsibility for maintaining high-average utilization, and sustainability optimization of the deployed hardware from you to AWS.
Implementation Resources
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
[Title]
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.