How Do You Troubleshoot the AWS CLI Error Regarding IllegalLocationConstraintException?

Problem scenario
You run a command like this:

aws s3api create-bucket –bucket coolnameforbucket

But you get this error:
“An error occurred (IllegalLocationConstraintException) when calling the CreateBucket operation: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.”

How do you create a bucket with the aws s3api command?

Possible Solution #1
Run a command such as this,

How Do You Use Google’s Cloud Pub/Sub with Python?

Problem scenario
You want to use a Data Analytics or a Big Data tool that publishes messages and subscribes to listening to messages being published. You know GCP has a Pub/Sub tool. You know it supports synchronous and asynchronous messaging. How do you use it with Python?

Solution

  1. Log into GCP via the web UI.
  2. Go here: https://console.cloud.google.com/cloudpubsub/
  3. Click “Create Topic”.

How Do You Troubleshoot a Kubernetes Dashboard Message about a 403 Forbidden Error?

Problem scenario
You created an EKS cluster. But when you open a web browser and go to the API endpoint, you get a 403 forbidden error.

The web browser shows something like this:

kind “Status”
apiVersion “v1”
metadata {}
status “Failure”
message “forbidden: User \”system:anonymous\” cannot get path \”/\””
reason “Forbidden”
details {}
code 403

How do you access the web UI in Kubernetes for the first time?

How Do You Find the Resource Group Names in your Azure Account?

Problem scenario
You want to use an existing Resource Group name.  How do you find which ones you have created?

Solution
1.  Log into the web UI for the Azure Portal.
2.  On the left there often will be an item “Resource Groups” (under favorites).  Click on it.  If it is not there, search for “Resource Groups”

How Do You Delete VM Instances from GCP That Pertain to GKE?

Problem Scenario
You have some GKE standard clusters that you want deleted.  What should you do?

Possible Solution #1 (from the Cloud Shell or with a gcloud command)
1.  Delete the instance group of the instance for the cluster you want to delete.  To do this in the web UI, go to Compute Engine -Instance Groups.  Check the box on the left-hand side and click on “Delete”.

How Do You Create a Logic App without Using the Azure Portal Web UI?

Problem scenario
You want to create a Logic App without using the Azure Portal web UI.  What should you do?

Possible Solution #1
To get an overview of using an ARM template for a Logic App, you should read this article.

Possible Solution #2
If you have Visual Studio, you can use the Azure Logic Apps Tool for Visual Studio. 

How Do You Troubleshoot This Message “ImportError: No module named ‘google.cloud’?

Problem scenario
You run a Python program or from the Python command prompt you receive this message:

Traceback (most recent call last):
  File “main.py”, line 21, in <module
    from google.cloud import pubsub_v1
 ImportError: No module named ‘google.cloud’

ModuleNotFoundError: No module named ‘google’

What should you do to eliminate this problem?

Possible Solution #1
Try to run the program as sudo:

sudo python nameOfProg.py

Possible Solution #2
Try this with or without sudo (depending on whether or not you are using “sudo” to run the Python program):

sudo pip install google-cloud-bigquery

# You may or may not want to omit the “sudo” in the above command.