How Do You Use Amazon Simple Queue Service?

Problem scenario
You want to use Amazon SQS. How do you use this in AWS?

Solution

  1. Log into the AWS console.
  2. Go here: https://console.aws.amazon.com/sqs/
  3. Click “Get Started”
  4. Enter a queue name (e.g., contintqueue)
  5. Click “Quick-Create Queue”
  6. Click the radio button associated with the queue. Then click “Queue Actions” (the button near the top left).

How Do You Troubleshoot the Error “Could not find suitable distribution for Requirement.parse(‘botocore==2.0.0dev11’)”?

Problem scenario
You try to install the AWS CLI version 2.x

You run this command:

$ sudo python3 setup.py install

You get a message like this:

Processing dependencies for awscli==2.0.7
Searching for botocore==2.0.0dev11
Reading https://pypi.org/simple/botocore/
No local packages or working download links found for botocore==2.0.0dev11
error: Could not find suitable distribution for Requirement.parse(‘botocore==2.0.0dev11’)

What should you do?

How Do You Troubleshoot “error occurred (AccessDeniedException) when calling the CreateCluster operation: User: … is not authorized to perform: iam:PassRole on resource:…”?

Problem scenario
You run this command:

aws eks create-cluster –name contint –role-arn arn:aws:iam::12345678910:role/contintrole –resources-vpc-config subnetIds=subnet-a123456,subnet-b77777777,securityGroupIds=sg-2e324234254

You get this error:

An error occurred (AccessDeniedException) when calling the CreateCluster operation: User: arn:aws:iam::12345678910:user/contintuser is not authorized to perform: iam:PassRole on resource: arn:aws:iam::12345678910:role/contintrole

What should you do?

Solution
1. Log into the AWS Console.
2. Go to IAM -Users
3.

How Do You Troubleshoot the AWS CLI Message “An error occurred (AccessDeniedException) when calling the ListClusters operation”?

Problem scenario
You run this command aws eks list-clusters, but you get this message:

“An error occurred (AccessDeniedException) when calling the ListClusters operation: User: arn:aws:iam::12345678910:user/jdoe is not authorized to perform: eks:ListClusters on resource: arn:aws:eks:us-west-1:12345678910:cluster/*”

What should you do?

Solution
1. Go to the AWS Console and log in.
2. Go to IAM -> Users
3.

How Do You Troubleshoot the EKS Error “AccessDeniedException…Clusters operation: Account …is not authorized to use this service”?

Problem scenario
In one region, but not another, you get this error with an “aws eks list-clusters” command:

“An error occurred (AccessDeniedException) when calling the ListClusters operation: Account 12345678910 is not authorized to use this service”

You know that IAM does not require region selection. What is causing this eks error?

Solution
Is your AWS CLI configured to use a region that eks does not support?

How Do You Copy a File into an S3 Bucket using the AWS CLI?

Problem scenario
How do you copy a file from a Linux server with AWS CLI to an S3 bucket?

Solution
Draft a command like this but replace /tmp/good.txt with the path and name of the source file you are copying, and replace “foobar” with the name of the s3 bucket you are copying to (as the destination):

aws s3 cp /tmp/good.txt s3://foobar/

Run the command.