June 25, 2022
#AWS
#CLI
If you are using aws configure sso to populate your ~/.aws/credentials file and you get the following error when you try and reauthorize, then you can …
Read Article →
June 24, 2022
#CLI
If you need to match a string in a file, then grep is your friend.
An example of using grep
Let’s take a file called somefile.txt
this
is
a
test …
Read Article →
June 23, 2022
#AWS
#CLI
If you want to invoke an AWS Lambda from your CLI, then the best option is to have the AWS CLI installed.
Getting started with the AWS CLI – AWS …!-->
Read Article →
June 22, 2022
#CLI
#Linux
Sometimes you might want to exit a command if a variable is not set in Bash.
You can do this as follows:
if [ -z "$VARIABLE_NAME" ]; then echo …
Read Article →
June 21, 2022
#CLI
if you have a conditional in your Gitlab pipeline stage that checks if something has succeeded or failed, then you can use this to pass or fail your …
Read Article →
June 20, 2022
#AWS
#CLI
If you find yourself having the requirements to support both AWS CLI v1 and v2 simultaneously, then you can use the following conditional in Bash to …
Read Article →
June 19, 2022
#AWS
#CLI
If you have tried calling the AWS CLI and got the following error:
Unknown options: --cli-binary-format
Then it is because you are using the AWS CLI …
Read Article →
June 18, 2022
#Python
If you need to generate a random string that looks something like this: VUNBXJ-230411, then you can use the following random generator:
import random, …
Read Article →
June 17, 2022
#CLI
#Linux
If you need to check the version and flavour of the running Linux instance, then you can try the below commands:
cat /etc/os-release
lsb_release -a …
Read Article →
June 16, 2022
#Terraform
If you are using S3 as the backend for your state management in Terraform, then you can create environment specific configuration files where you …
Read Article →
June 15, 2022
#Terraform
Sometimes your infrastructure may be out of sync with your Terraform state because resources may have been amended or deleted manually.
For this you …
Read Article →
June 14, 2022
#C++
There isn’t really a standard way to get the length of array in C. This means you need to do some additional work to achieve getting the length …
Read Article →