[ https://issues.apache.org/jira/browse/JCLOUDS-1439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16574751#comment-16574751 ]
Ignasi Barrera commented on JCLOUDS-1439: ----------------------------------------- I don't really know how MFA works in AWS, but if the only thing you need is to provide a session token, you can do that when creating the context, as follows: {code:java} ContextBuilder.newBuilder("aws-ec2") ... .credentialsSupplier(new Supplier<Credentials>() { @Override public Credentials get() { return SessionCredentials.builder() .accessKeyId("access key") .secretAccessKey("secret key") .sessionToken("session token") .expiration(new Date()) // Change to a proper value .build(); } }) ... {code} > How to connect AWS environment through Multi factor authentication(MFA) in > jcloud > --------------------------------------------------------------------------------- > > Key: JCLOUDS-1439 > URL: https://issues.apache.org/jira/browse/JCLOUDS-1439 > Project: jclouds > Issue Type: Task > Components: jclouds-compute > Affects Versions: 2.0.3 > Reporter: Bharat Agarwal > Priority: Major > Labels: aws-ec2, aws-s3 > Fix For: 2.0.3 > > > Please let us know how to connect AWS environment programmatically in jcloud > through MFA. > AWS API uses getSessionToken to recieve the AWS MFA. Is there any way to use > MFA in jcloud to access the AWS? -- This message was sent by Atlassian JIRA (v7.6.3#76005)