Skip to content

Commit

Permalink
Read AWS_PROFILE in bin.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
galenhuntington committed Apr 12, 2019
1 parent 5c88daf commit 901cea6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion awslogs/bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def add_common_arguments(parser):
parser.add_argument("--profile",
dest="aws_profile",
type=str,
default=None,
default=os.environ.get('AWS_PROFILE', None),
help="aws profile")

parser.add_argument("--aws-region",
Expand Down
2 changes: 1 addition & 1 deletion awslogs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self, **kwargs):
self.aws_access_key_id = kwargs.get('aws_access_key_id')
self.aws_secret_access_key = kwargs.get('aws_secret_access_key')
self.aws_session_token = kwargs.get('aws_session_token')
self.aws_profile = kwargs.get('aws_profile') or os.getenv('AWS_PROFILE')
self.aws_profile = kwargs.get('aws_profile')
self.log_group_name = kwargs.get('log_group_name')
self.log_stream_name = kwargs.get('log_stream_name')
self.filter_pattern = kwargs.get('filter_pattern')
Expand Down

0 comments on commit 901cea6

Please sign in to comment.