https://pulumi.com logo
Title
a

astonishing-librarian-23155

04/25/2023, 1:16 PM
Hi, I am creating an aws provider to assume a role into another account to get information about 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 import eks
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)
            )