Paul Shearer
Paul Shearer

Reputation: 131

using R & paws how switch/assume different IAM Role?

I'm logging in successfully to AWS via paws however am in the parent account.

library(paws)

Sys.setenv(
  AWS_ACCESS_KEY_ID = "*****************************************",
  AWS_SECRET_ACCESS_KEY = "************************************",
  AWS_SESSION_TOKEN = "******************************************************************",
  AWS_REGION = "us-west-2"
)

mys3<- paws::s3()
temp_s3 <- mys3$list_buckets()

I'm want to change to a child account and list the buckets under it. Any ideas?

Upvotes: 0

Views: 636

Answers (1)

Andre.IDK
Andre.IDK

Reputation: 2047

What you're looking for is Switching Role via API.

Provided that you have all the necessary rights and parameters, you should use the methods of the STS service, Paws seems to cover all the basic ones and you can find their documentation here.

Upvotes: 1

Related Questions