How Do You Use the AWS CLI to List Aurora Databases?

Problem scenario
You have an Amazon Aurora database in you AWS account. You want to see the status of this database with the AWS CLI. How do you list information about your Aurora databases?

Solution
Prerequisites

You must have the AWS CLI installed and configured with a user that has the ability to view Aurora databases (e.g., an administrator of your AWS account).

How Do You Find the URL (or HTTP Endpoint) of a Kubernetes Cluster Running in Amazon EKS?

Problem scenario
You have a Kubernetes cluster in AWS. You have the AWS CLI installed. How do you find the URL for the Kubernetes cluster?

Solution
1. Run this command: aws eks list-clusters

2. Run this command: aws eks describe-cluster foobar # where “foobar” was name determined in above command

How Do You Find what VPC an EC-2 Instance Is In?

Problem scenario
You want to determine what VPC a given AWS server is in. How do you find this out?

Solution
Prerequisite

You must have the AWS CLI installed and configured with a user that has the ability to view EC-2 databases (e.g., an administrator of your AWS account). If you need assistance, see this posting.

Procedure
Run this command: aws rds describe-db-instances | grep -i vpc

How Do You Use the aws update-kubeconfig Command?

Problem scenario
You want to manage your Amazon Kubernetes (i.e., EKS) cluster. You have installed the AWS CLI version on a Linux server, and you want to use the update-config or update-kubeconfig command.

But when you try you see messages like “error argument command: Invalid choice…” or “update-config: command not found”. You could not readily find an example. What should you do?

Solution
Background
The command is update-kubeconfig,

How Do You Interpret the dstat Utility’s Results on a Linux Server in AWS?

Problem scenario
You want to monitor network traffic on an EC-2 server’s NICs. You are not sure what to look for or what a baseline should look like. What do you do?

Solution
1. Install dstat. With a CentOS/RHEL/Fedora server, run this: sudo yum -y install dstat
2. Run this command: dstat -nt
3. With no network activity beyond the PuTTy session to the EC-2 server,

How Do You Set Up a Multi-Node Cluster of Zookeeper?

Problem scenario
You want to set up Zookeeper with three nodes in AWS. What do you do?

Solution
1. Install Zookeeper on each of the servers. If you need assistance with this, see this posting.

2. Modify the zoo.cfg file on each of the servers. Add stanzas like these but substitute foobarX.amazonaws.com with the Public DNS name of each server:

server.1=foobar1.amazonaws.com:2888:3888
server.2=foobar2.amazonaws.com:2888:3888
server.3=foobar3.amazonaws.com:2888:3888
initLimit=5
syncLimit=5

3.

How Do You Troubleshoot the Message “ImportError: cannot import name ‘pubsub_v1′”?

Problem scenario
From the Python command prompt or when running a Python program, you receive this message “ImportError: cannot import name ‘pubsub_v1′”. What should you do?

Solution
Possible Solution #1
Try to run the program as sudo: sudo python nameOfProg.py

Possible Solution #2
Prerequisite
This assumes that pip has been installed.

How Do You Troubleshoot the Message “ImportError: No module named ‘google'”?

Problem scenario
From the Python command prompt or when running a Python program, you receive this message “ImportError: No module named ‘google'”. What should you do?

Solution
Possible Solution #1
Try to run the program as sudo: sudo python nameOfProg.py

Possible Solution #2
Prerequisite
This assumes that pip has been installed.