How to use provider in python. Like I am trying to...
# general
How to use provider in python. Like I am trying to assume a role and then get the details of that role in getCallerIdentity.
Copy code
provider = aws.Provider{"privileged:,
assume_role={'role_arn': role_to_assume_arn,
'session_name': 'Test',

Now I want to use this in my getCallerIdentity

assumedRole = aws.getCallerIdentity(provider=provider).arn. How to do this.
@glamorous-afternoon-59004 you’re gonna have a lot easier time if you use something with intellisense and use the python typings. I threw this together real quick, it’s untested:
Copy code
"""An AWS Python Pulumi program"""

import pulumi
import pulumi_aws as aws

provider = aws.Provider(
            role_arn="role.arn", session_name="something"

identity = aws.get_caller_identity(pulumi.InvokeOptions(provider=provider))
arn = identity.arn
🙌 1