You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by GitBox <gi...@apache.org> on 2022/11/27 21:06:14 UTC

[GitHub] [libcloud] denyszhak opened a new issue, #1803: Role based EC2 access to S3

denyszhak opened a new issue, #1803:
URL: https://github.com/apache/libcloud/issues/1803

   ## Feature Request
   
   The key parameter is required to access S3 using S3StorageDriver https://github.com/apache/libcloud/blob/7b3f55a3ac2ec8423555cd9bac3a42697ffc502c/libcloud/storage/drivers/s3.py#L1224, even if provided it fails down in the code in the absence of secret here https://github.com/apache/libcloud/blob/trunk/libcloud/common/aws.py#L313
   
   Can you suggest the usage of your client for role-based EC2 access to S3 or the possibility to add it? (where key and secret are now known well in advance but using STS for temporary access by tokens)
   
   Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [libcloud] denyszhak commented on issue #1803: Role based EC2 access to S3

Posted by "denyszhak (via GitHub)" <gi...@apache.org>.
denyszhak commented on issue #1803:
URL: https://github.com/apache/libcloud/issues/1803#issuecomment-1447081995

   @Kami Any chance you can provide your input here? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [libcloud] jan-mue commented on issue #1803: Role based EC2 access to S3

Posted by "jan-mue (via GitHub)" <gi...@apache.org>.
jan-mue commented on issue #1803:
URL: https://github.com/apache/libcloud/issues/1803#issuecomment-1514436146

   @denyszhak you can try this code to use the credentials from an IAM instance profile on EC2:
   ```python
   import boto3
   from libcloud.storage.types import Provider
   from libcloud.storage.providers import get_driver
   
   session = boto3.Session()
   credentials = session.get_credentials().get_frozen_credentials()
   cls = get_driver(Provider.S3)
   driver = cls(region="region", key=credentials.access_key, secret=credentials.secret_key, token=credentials.token)
   ```
   If you have some long-running operations that use this libcloud driver, you might have to refresh the credentials, though.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [libcloud] denyszhak commented on issue #1803: Role based EC2 access to S3

Posted by GitBox <gi...@apache.org>.
denyszhak commented on issue #1803:
URL: https://github.com/apache/libcloud/issues/1803#issuecomment-1332222746

   @Kami Does it make sense to add support for retrieving keys from instance metadata as a part of the library for every provider where it makes sense? I could review and propose an MR. If you don't want to have it in the library then let me know
   
   Thanks!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org