01 Run the describe-virtual-gateway command (OSX/Linux/UNIX) using the name of the Amazon App Mesh virtual gateway that you want to examine as the identifier parameter and custom query filters to describe the configuration specifications available for the selected virtual gateway:
aws appmesh describe-virtual-gateway
--region us-east-1
--mesh-name cc-production-app-mesh
--virtual-gateway-name cc-prod-mesh-virtual-gateway
--query 'virtualGateway.spec'
02 The command output should return the requested virtual gateway specifications:
{
"backendDefaults": {
"clientPolicy": {}
},
"listeners": [
{
"portMapping": {
"port": 80,
"protocol": "http"
}
}
],
"logging": {}
}
03 Modify the virtual gateway specifications returned at the previous step to include the health check policy defined for the virtual gateway listener (highlighted). Save the following configuration document to a JSON file named virtual-gateway-health-check-specs.json:
{
"backendDefaults": {
"clientPolicy": {}
},
"listeners": [
{
"healthCheck": {
"healthyThreshold": 5,
"intervalMillis": 30000,
"path": "/",
"port": 80,
"protocol": "http",
"timeoutMillis": 5000,
"unhealthyThreshold": 2
}
,
"portMapping": {
"port": 80,
"protocol": "http"
}
}
],
"logging": {}
}
04 Run the update-virtual-gateway command (OSX/Linux/UNIX) to enable health checks for the listener associated with the specified Amazon App Mesh virtual gateway, using the configuration specifications defined at the previous step:
aws appmesh update-virtual-gateway
--region us-east-1
--mesh-name cc-production-app-mesh
--virtual-gateway-name cc-prod-mesh-virtual-gateway
--spec file://virtual-gateway-health-check-specs.json
05 The command output should return the metadata available for the reconfigured App Mesh virtual gateway:
{
"virtualGateway": {
"meshName": "cc-production-app-mesh",
"metadata": {
"arn": "arn:aws:appmesh:us-east-1:123456789012:mesh/cc-production-app-mesh/virtualGateway/cc-prod-mesh-virtual-gateway",
"createdAt": "2021-01-28T10:00:00.000000+00:00",
"lastUpdatedAt": "2021-01-29T10:00:00.000000+00:00",
"meshOwner": "123456789012",
"resourceOwner": "123456789012",
"uid": "1234abcd-1234-abcd-1234-abcd1234abcd",
"version": 7
},
"spec": {
"backendDefaults": {
"clientPolicy": {}
},
"listeners": [
{
"healthCheck": {
"healthyThreshold": 5,
"intervalMillis": 30000,
"path": "/",
"port": 80,
"protocol": "http",
"timeoutMillis": 5000,
"unhealthyThreshold": 2
},
"portMapping": {
"port": 80,
"protocol": "http"
}
}
],
"logging": {}
},
"status": {
"status": "ACTIVE"
},
"virtualGatewayName": "cc-prod-mesh-virtual-gateway"
}
}
06 Repeat steps no. 1 – 5 for each App Mesh virtual gateway that you want to reconfigure, created for the specified service mesh.
07 Repeat steps no. 1 – 6 for each App Mesh service mesh deployed in the selected AWS region.
08 Change the AWS cloud region by updating the --region command parameter value and repeat steps no. 1 – 7 to perform the entire remediation process for other regions.