__init__.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:aardvark 作者: Netflix-Skunkworks 项目源码 文件源码
def _get_creds(self):
        """
        Assumes into the target account and obtains Access Key, Secret Key, and Token

        :return: URL-encoded dictionary containing Access Key, Secret Key, and Token
        """
        client, credentials = boto3_cached_conn(
            'iam', account_number=self.account_number, assume_role=self.role_name, return_credentials=True)

        creds = json.dumps(dict(
            sessionId=credentials['AccessKeyId'],
            sessionKey=credentials['SecretAccessKey'],
            sessionToken=credentials['SessionToken']
        ))
        creds = urllib.quote(creds, safe='')
        return creds
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号