Optimizing Delivery workloads with the Amazon Location Service Route Optimization Accelerator
Learn how to deploy the new Route Optimization Accelerator and optimize delivery routes
1
npm install -g pnpm
1
pnpm i @aws/pdk
1
sudo yum install maven
1
docker run --privileged --rm tonistiigi/binfmt --install all
1
git clone https://github.com/aws-samples/route-optimization-accelerator.git
route-optimization-accelerator
directory and run 1
pnpm install
[profile]
with the name of the AWS Profile loaded on your machine.1
aws ecr-public get-login-password --region us-east-1 --profile [profile] | docker login --username AWS --password-stdin public.ecr.aws
1
2
3
4
5
6
Admin:~/environment/route-optimization-accelerator $ aws ecr-public get-login-password --region us-east-1 --profile default | docker login --username AWS --password-stdin public.ecr.aws
WARNING! Your password will be stored unencrypted in /home/ec2-user/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
1
pnpm run build:all
1
NX Successfully ran target build for 13 projects
packages/infra-app
directory and run the following, replacing [profile]
with your configured AWS profie.1
pnpm cdk bootstrap --profile [profile]
admin@an-email-domain.com
with the email address you would like to use to log into the Web UI, and [profile]
with your configured AWS profile.1
pnpm pdk deploy --parameters AdminUserEmail=admin@an-email-domain.com --parameters AdminUserName=admin --profile [profile]
1
2
3
4
5
6
7
8
9
10
11
✅ InfraDev
✨ Deployment time: 462.41s
Outputs:
InfraDev.WebApiEndpoint13F401B3 = https://xxxxxxxxx.execute-api.us-east-1.amazonaws.com/prod/
InfraDev.WebAppStaticWebsiteDistributionDomainNameA051124F = xxxxxxxxxxx.cloudfront.net
Stack ARN:
arn:aws:cloudformation:us-east-1:xxxxxxxxxxxx:stack/InfraDev/0a84da60-fcd0-11ee-82b4-0affe12f9d3b
✨ Total time: 497.51s
InfraDev.WebApiEndpointxxxxx
URL from the build command output above. 

Seattle Depot
as the Name, select Depot as the Type and for the address, enter 2021 7th AveSeattle WA, 98121 which is the Amazon Doppler office. Select Save

Address: 2250 7th Ave
Seattle WA, 98121
Address: 2111 7th Ave
Seattle, WA 98121
Address: 1007 Stewart St.
Seattle WA, 98101
Address: 2121 8th Ave
Seattle, WA 98121
Address: 1918 8th Ave
Ste 400
Seattle WA, 98101

Location: Seattle Depot
Max Orders: 10



[ID]
with the ID retrieved above for your vehicle:1
aws location batch-update-device-position --tracker-name roa-fleet-tracker --updates Accuracy={Horizontal=0},PositionProperties={name="Vehicle1"},DeviceId=[ID],Position=-122.33883581542057,47.615836228280635,SampleTime=$(date +%s)

ORDER1
with the Origin set as Seattle Depot and the Destination set as Nitro_North. For Service time set 300. Select Save. Repeat this process 4 more times with the following information:
Origin: Seattle Depot
Destination: Spheres
Service time: 300
Origin: Seattle Depot
Destination: Oscar
Service time: 300
Origin: Seattle Depot
Destination: Reinvent
Service time: 300
Origin: Seattle Depot
Destination: Blackfoot
Service time: 300









Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.