def get_aws_creds(self):
result = {}<EOL>if boto3.DEFAULT_SESSION:<EOL><INDENT>session = boto3.DEFAULT_SESSION<EOL><DEDENT>else:<EOL><INDENT>session = boto3.session.Session()<EOL><DEDENT>profile_name = session.profile_name if session else None<EOL>LOG.debug("<STR_LIT>", profile_name)<EOL>if not session:<EOL><INDENT>return result<EOL><DEDENT>creds = session.get_credentials()<EOL>if not creds:<EOL><INDENT>return result<EOL><DEDENT>if hasattr(session, '<STR_LIT>') and session.region_name:<EOL><INDENT>result["<STR_LIT>"] = session.region_name<EOL><DEDENT>if hasattr(creds, '<STR_LIT>') and creds.access_key:<EOL><INDENT>result["<STR_LIT:key>"] = creds.access_key<EOL><DEDENT>if hasattr(creds, '<STR_LIT>') and creds.secret_key:<EOL><INDENT>result["<STR_LIT>"] = creds.secret_key<EOL><DEDENT>if hasattr(creds, '<STR_LIT>') and creds.token:<EOL><INDENT>result["<STR_LIT>"] = creds.token<EOL><DEDENT>return result<EOL>
Returns AWS credentials obtained from the shell environment or given profile

:return dict: A dictionary containing credentials. This dict has the structure
     {"region": "", "key": "", "secret": "", "sessiontoken": ""}. If credentials could not be resolved,
     this returns None