generated from DNXLabs/docker-module-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve script logging and fix api trottling
- Loading branch information
1 parent
d700384
commit fe27360
Showing
7 changed files
with
128 additions
and
82 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import boto3 | ||
import os | ||
|
||
|
||
def get_boto_client(): | ||
print("AUTH_METHOD: " + str(os.getenv('AUTH_METHOD'))) | ||
if os.getenv('AUTH_METHOD') == 'SSO': | ||
boto3.setup_default_session(profile_name=os.getenv('SSO_PROFILE')) | ||
print("SSO Authentication") | ||
else: | ||
print("AWS KEYS authentication") | ||
return boto3 | ||
print("AUTH_METHOD: ") | ||
if os.getenv('AUTH_METHOD') == 'SSO': | ||
boto3.setup_default_session(profile_name=os.getenv('SSO_PROFILE')) | ||
print("\t -> SSO Authentication\n") | ||
else: | ||
print("\t -> AWS KEYS authentication\n") | ||
return boto3 |
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
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
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
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
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
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