Please note that this workshop has been archived and is not actively maintained. On September 30, 2026, AWS will discontinue support for AWS App Mesh. For more information, visit this blog post.
# Define variables #
SPEC=$(cat <<-EOF
{
"httpRoute": {
"action": {
"weightedTargets": [
{
"virtualNode": "crystal-sd-epoch",
"weight": 1
}
]
},
"match": {
"prefix": "/",
"headers": [
{
"name": "canary_fleet",
"match": {
"exact": "true"
}
}
]
}
},
"priority": 1
}
EOF
); \
# Create app mesh route #
aws appmesh create-route \
--mesh-name appmesh-workshop \
--virtual-router-name crystal-router \
--route-name crystal-header-route \
--spec "$SPEC"