Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion MWAA/verify_env/verify_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from __future__ import print_function
import argparse
import json
import os
import socket
import time
import re
Expand Down Expand Up @@ -972,7 +973,8 @@ def get_mwaa_utilized_services(ec2_client, vpc):
TOP_LEVEL_DOMAIN = '.amazonaws.com.cn' if PARTITION == 'aws-cn' else '.amazonaws.com'
PROFILE = args.profile
try:
boto3.setup_default_session(profile_name=PROFILE)
if PROFILE != 'default' or (not os.environ.get('AWS_ACCESS_KEY_ID') and not os.environ.get('AWS_PROFILE')):
boto3.setup_default_session(profile_name=PROFILE)
ec2 = boto3.client('ec2', region_name=REGION)
s3 = boto3.client('s3', region_name=REGION)
s3control = boto3.client('s3control', region_name=REGION)
Expand Down