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 Insure Your Bitcoin/Cryptocurrency Holdings?

Problem scenario
You have a sizable cryptocurrency position. You are concerned that if you lose it, you will not be able to get it back. What should you do?

Solution
This is not legal advice.

  1. Self-insure. Ensure you use multi-factor authentication if you use an online platform. If you need a username, a password, and access to a separate physical device (such as a smart phone for a passphrase or code number),

What are Recommended Practices vs. “Best Practices”?

Background
Facebook’s engineering culture during its earlier days of rapid growth was “move fast and break things.” But the Harvard Business Review says that this era is over.

Problem scenario
You are concerned about recommended practices and “best practices.” You want to be productive and leave no security gaps in your systems that you design/install or allow bugs in your code.

How Do You Troubleshoot the Hadoop Message “Exception in thread “main” java.nio.file.AccessDeniedException: /home/jdoe/./mapper.py”?

Problem scenario
You are trying to run a hadoop command (to kick off a mapreduce job). But you get this error:
“Exception in thread “main” java.nio.file.AccessDeniedException: /home/jdoe/./mapper.py”

What should you do?

Solution (short version)
Change to a directory where the user can write files to. Retry the command.

Solution (long version)
Create a directory that is owned by the user and the group associated with the user that is running this command.

What is a Hacker?

Question
You have seen the word “hacker” appear in different contexts. You have seen it used to describe a cybercriminal. Moreover some companies proudly claim that they employ no hackers while only hiring trained software developers. In some articles the term hacker has a positive connotation. What is a hacker?

Answer
“Hacking tends to be a misunderstood topic, and the media likes to sensationalize,

What Are Some Ways to Prevent XSS Attacks with a Web Page That Uses JavaScript?

Problem scenario
You know that cross-site scripting (aka XSS) attacks are a big concern in today’s world. OWASP places XSS security risks as the seventh biggest web application risk as of June 2020. What are some techniques to stop such attacks from happening when designing a website that uses JavaScript?

Possible Solution #1
Have the HTML and JavaScript validate and escape regularly throughout the code.

How Do You Find the Owner of an AWS Resource?

Problem scenario
In AWS you find some components, such as a Security Group, has an owner. You cannot find the owner in IAM. How do you learn more about this user?

Solution
The owner is not an IAM user. In the AWS Console, go to Support -Support Center. Search for the owner number there. You may have different account aliases. If you log into each one,

How Do You Change the Version of Python that Ansible Uses?

Problem scenario
You are using Ansible with -vvv to see what Python version it is using. (Or you use ansible –version.) You see an incorrect version of Python being used.

You tried ansible_python_interpreter=/usr/bin/python3 in your playbook and in the ansible.cfg file. Neither worked.

What should you do?

Solution
In the playbook, find the hosts stanza. Underneath it use this (where python3 is the version you want and “/usr/bin” is the path to it):

vars:
ansible_python_interpreter: /usr/bin/python3 …