How Do You Troubleshoot “Connect timeout on endpoint https://ssm.us-west1.amazonaws.com…”?

Problem scenario
You try to run an aws ssm command. But you get an error about a connection timing out. What should you do?

Solution
Find the EC-2 server’s VPC and subnet. Go to VPC in the AWS console. Go to the Subnet section. Find the Route Table associated with the subnet for the EC-2 server. Make sure that the “Destination” field accommodates the IP address of the ssm.us-west1.amazonaws.com hostname.

How Do You Troubleshoot the “aws ssm” Command Failing with a Message about “InvalidInstanceId”?

Problem scenario
In AWS Systems Manager you run an “aws ssm” command. You get “An error occurred (InvalidInstanceId) when calling the Send Command operation.” What should you do?

Solution
Are there spaces or braces inside the double quotes? These symbols are not part of the instance ID. If you are running a script or complex command, extraneous symbols may be getting injected into your instance ID.

How Do You Find the Underlying Component in AWS for a Given URL Endpoint?

Problem scenario
You have been given a URL endpoint that is supported by some AWS service or services. How do you find out what the underlying service is?

Solution

  1. Determine the IP address. Ping the hostname. If you have a URL like this, https://acme.com/path/to/file.html, extract the domain name; you can deduce it is acme in the example. Open a command terminal and ping acme.

How Do You Troubleshoot the Ansible Error “This task includes an option with an undefined variable”?

Problem scenario
You have a playbook, and your variables are defined. But you get an error “FAILED ={‘msg”: ‘The task includes an option with an undefined variable. The error was ‘dict object’ has no attribute ‘Name’…”

What do you do to solve this?

Solution
The variable’s source could be blank. With “ec2_instance_info” the module will connect to AWS.

What Do You Do If CloudWatch Metrics Are Not Showing Up in the Dashboard?

Problem scenario
You used a .json file and the AWS CLI to configure customized metrics. When you go to the GUI you do not see the graphs. The commands that were run with the .json file completed without errors or problems. How do you get the web console to show the metrics you configured for various AWS components?

Possible Solution #1
CloudWatch metrics are not all necessarily graphed.