Hi Andrew,

Yes I tried the Instance Profile, AWS in itself provides the
InstanceProfileCredentialsProvider class for credentials (which I
guess are fetched from EC2 metadata instance), But when these
credentials are provided AWS throws unrecognized credentials
Exception.

What I understand is, AWS uses some Token mechanism which it generates
if it's an Instance Credential (Which I guess we can't provide) via
jClouds mechanism.

Anyways Thanks for your support and as you said if someone in this
thread might be able to help would be great.

Thanks & Regards,
Abhinav Pradhan

On Wed, Jan 12, 2022 at 2:32 AM Andrew Phillips <aphill...@qrmedia.com> wrote:
>
> > Isn't there any way where we don't provide any credentials and during
> > actual calls blob fetches the credentials (via EC2 token internally)
> > just like the original AWS (AmazonS3ClientBuilder) client uses.
>
> As far as I am aware, this is not currently possible, no.
> https://github.com/jclouds/legacy-jclouds/issues/1280 seems like a
> feature request for this, but it was not implemented.
>
> What the AWS libraries are doing, as you point out, is fetching the
> token internally before making any calls. The Stack Overflow example
> demonstrates how one can do this using jclouds, but using STS.
>
> For the instance profile, I think what would be needed is something
> like:
>
> 1) Get an instance of the the instance profile API (this is in
> jclouds-labs-aws)
> 2) Use this instance to pull credentials from the machine when needed
> 3) Pass the credentials retrieved in 2) to jclouds via a
> Supplier<Credentials>
>
> I haven't tried this myself, though - hopefully someone on this thread
> is able to provide a code example, or other ways in which this can (or
> cannot) be made to work!
>
> Regards
>
> ap

-- 


This communication is confidential and
subject to and governed by Saama’s 
Electronic
Communications Disclaimer. 
<https://www.saama.com/email-communication-disclaimer/>



 

Reply via email to