Skip to content

Instantly share code, notes, and snippets.

View maksim-paskal's full-sized avatar
🏠
Working from home

Maksim Paskal maksim-paskal

🏠
Working from home
View GitHub Profile
#!/bin/bash
TMPDIR=$(mktemp -d $MKTEMP_BASEDIR)
function check_service {
mkdir -p $TMPDIR/logs/
journalctl -n 100000 --unit=k3s > $TMPDIR/logs/journalctl-k3s
}
#!/bin/sh
auth=$(aws sts get-session-token --profile prod-static \
--serial-number arn:aws:iam::<mfa> \
--duration-seconds 129600 \
--token-code "$1")
aws --profile prod configure set region us-east-1
aws --profile prod configure set aws_access_key_id "$(echo $auth | jq -r .Credentials.AccessKeyId)"
aws --profile prod configure set aws_secret_access_key "$(echo $auth | jq -r .Credentials.SecretAccessKey)"