А вот и скриптик ))
#!/bin/bash
#12-digit number after iam:: is an account ID of the child organization account
full_session_data=$(aws sts assume-role --role-arn arn:aws:iam::123456789012:role/OrganizationAccountAccessRole --duration-seconds 900 --role-session-name mini-admin --query "Credentials" --output json | tr -d '{' | tr -d '}' | sed 's/ //g' | tr -d '\n')
AccessKeyId=$(echo $full_session_data | cut -d, -f1 | awk -F'":"' '{print $2}' | tr -d '"')
SecretAccessKey=$(echo $full_session_data | cut -d, -f2 | awk -F'":"' '{print $2}' | tr -d '"')
SessionToken=$(echo $full_session_data | cut -d, -f3 | awk -F'":"' '{print $2}' | tr -d '"')
echo $AccessKeyId
echo $SecretAccessKey
echo $SessionToken
export AWS_ACCESS_KEY_ID=$AccessKeyId
export AWS_SECRET_ACCESS_KEY=$SecretAccessKey
export AWS_SESSION_TOKEN=$SessionToken
#get all the regions to check each one for aws resources
regions=`aws ec2 describe-regions | grep RegionName | grep -o "[[:alnum:]]*\-[[:alnum:]]*\-[[:alnum:]]*" | tr '\n' ',' | sed 's/.$//'`
echo $regions
for eachregion in $(echo $regions | sed "s/,/ /g")
do
echo "for the region of ""$eachregion"" we have the following VPCs:"
aws ec2 describe-vpcs --region $eachregion | grep "VpcId"
done # end of instances cycle / for all regions