Skip to content

Instantly share code, notes, and snippets.

@frasergr
frasergr / aws-mfa-refresh.sh
Last active April 26, 2023 05:46
A script to generate an AWS STS token for MFA authentication
#!/bin/bash
# Written with assistance from GPT4
# Based on https://gist.github.com/ogavrisevs/2debdcb96d3002a9cbf2
function show_help() {
echo "Usage: $0 [MFA_TOKEN_CODE] [-h] [--help]"
echo
echo "This script updates the AWS session token for the specified profile."
echo
echo "Options:"
class Input extends React.Component
{
constructor(props) {
super(props);
this.state = {
inputText: '',
currentUrl: ''
};
this.handleChange = this.handleChange.bind(this);