Fix error sam deploy unable to locate credentials using AWS SAM with AWS CLI v2 SSO

I got this error sam deploy unable to locate credentials when trying to use AWS SAM with AWS CLIv2 SSO. Error: Unable to upload artifact myAPIName referenced by CodeUri parameter of myAPIName resource. Unable to locate credentials In summary, the fix is to update SAM. The issue: sam deploy unable to locate credentials First, I signed into AWS SSO with the profile I wanted to use. $ aws sso login --profile new-dev-sso Then, I tried to run sam deploy....

October 7, 2020 · 1 min · chart

Taking Off Into The Cloud: Guide On How To Get Your First AWS DevOps Job

This article is my attempt to describe the best way to get your first job in DevOps working with AWS services, either for people with previous tech experience or none. If you are starting on this journey feel free to leave a comment so I can give personalized advice. Who this article geared towards? This article is geared more towards people who are completely new to the cloud and possibly completely new to IT all together....

October 1, 2020 · 10 min · chart

Bash: Or in an until or while loop

Problem How do you write a while or until loop in bash which uses or in the condition? Solution The example is going to run until $a is A, $b is B, or $c is C #Example until loop waiting for one of the 3 conditions to evaluate to false. This loop will only run through once. a='' until [[ "$a" == 'A' || "$b" == 'B' || "$c" == 'C' ]]; do echo "waiting....

September 30, 2020 · 1 min · chart

CloudFormation deploying CodePipeline error: User: is not authorized to perform: iam:PassRole on resource: ...

A quick guide to how to fix this cloudformation error: is not authorized to perform: iam:PassRole on resource: The Problem: is not authorized to perform: iam:PassRole on resource: Yesterday I ran into this slightly miss leading error shown below: User: arn:aws:iam::123456789123:user/myUser is not authorized to perform: iam:PassRole on resource: CFDeployRole-lkjh1234lhj1324(Service: AWSCodePipeline; Status Code: 400; Error Code: AccessDeniedException; Request ID: xxxxxxxxx-1111-xxxx-1111-xxxxxxxxx; Proxy: null) I ran into this while deploying an IAM role in CloudFormation and then using it as the RoleARN for one action in a CodePipeline deployed by the same CloudFormation template....

August 18, 2020 · 3 min · chart

Install AWS SAM CLI on Linux without Homebew

The official AWS installation docs for Linux tell you to install Homebew so that you can install the AWS SAM CLI. This is just plain dumb. You should not need to install a new package manager just to install one tool. Below are the steps to follow so that you do not have to. Prerequisites Ensure Python 3 is install Ensure PIP 3 is installed Ensure AWS CLI v2 is installed and configured...

July 17, 2020 · 1 min · chart

WSL Wrong Time: How to Fix incorrect Time in WSL

While working with AWS SAM I ran into an error caused by the local system time of WSL being wrong. In the above image notice that the date command outputs the hour being 4. A call to worldtimeapi.org for my timezone shows the time being 12. Something is wrong. World time API call formatted with JQ: curl -s "http://worldtimeapi.org/api/ip" | jq '.["datetime"]' I attempted to re-configure WSL Ubuntu’s time with sudo dpkg-reconfigure tzdata...

July 13, 2020 · 2 min · chart