AssumeRoleWithWebIdentityResponse GetAssumeRoleWithWebIdentityResponse( AssumeRoleWithWebIdentityRequest assumeRoleWithWebIdentityRequest) { // Start with Anonymous AWS Credentials and get temporary credentials. var stsClient = new AmazonSecurityTokenServiceClient( new AnonymousAWSCredentials()); assumeRoleWithWebIdentityRequest.DurationSeconds = 3600; assumeRoleWithWebIdentityRequest.RoleSessionName = "MySession"; return stsClient.AssumeRoleWithWebIdentity( assumeRoleWithWebIdentityRequest); }