This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# specify your MFA_DEVICE_ARN | |
MFA_DEVICE_ARN=YOURMFAARN | |
PATH_TO_CREDENTIALS_FILE=/path/to/.aws/credentials | |
echo $PATH_TO_CREDENTIALS_FILE | |
#1H = 3600 | |
#2H = 7200 | |
#3H = 10800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change the run script on `settings> Build Execution and Deployment > Console > Python Console` to | |
# hoping you have your settings at project/project/settings.py (if not, change accordingly;) | |
import os,sys,django;sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS]) | |
os.environ['DJANGO_SETTINGS_MODULE'] = WORKING_DIR_AND_PYTHON_PATHS.split('/')[-1]+'.settings' | |
print('Python {0} on {1} using {2} as settings'.format(sys.version, sys.platform, os.environ['DJANGO_SETTINGS_MODULE'])) | |
django.setup() |