Hi, I am creating an aws provider to assume a ro...
# getting-started
a
Hi, I am creating an aws provider to assume a role into another account to get information from an eks cluster (shown below): When I call this function, I get the following exception:
Exception: invoke of aws:eks/getCluster:getCluster failed: invocation of aws:eks/getCluster:getCluster returned an error: error reading from server: EOF
Any suggestions on how to get around this? Thanks Note: I have imported eks as
from pulumi_aws
Copy code
def generate_cross_account_kubeconfig(cluster_name:str, role_arn: str):
        
        eks_provider = Provider(
            f"assume-role-{role_arn.split('/')[1]}",
            assume_role = [
                role_arn,
            ]
        )



        eks_cluster= eks.get_cluster(
            name=cluster_name,
            opts = pulumi.InvokeOptions(provider = eks_provider)
            )
d
Not sure if this is the issue (as I think the error would be different), but I thought the type of the
assume_role
arg would look like this:
Copy code
Provider(
  "name",
  assume_rule=ProviderAssumeRoleArgs(role_arn=role_arn),
)