开发者

Is there a way to create a S3 connection with a sessions token?

In boto and开发者_StackOverflow社区 S3 modules the S3 connection constructor takes the access key and the secret key. Is there a connection object that exists that also takes a session token?


I know this question is old, but it's one of the few results on Google. So here is how you can do this (at least with Boto 2.22.1):

conn = S3Connection(
    aws_access_key_id=<access>,
    aws_secret_access_key=<secret>,
    security_token=<token>.,
)


This hadn't currently been implemented in boto but has been now and will be in version 2.1 or is available now if you check out the source from github.

You can use a session token by passing the token with the key word argument security_token to boto.connect_s3. I think the session token will be implemented elsewhere soon as well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜