def _put_runner_creds()

in scripts/store-agent-creds.py [0:0]


def _put_runner_creds(repo: str, index: int):
    client = boto3.client("ssm")

    with open(".runner", encoding='utf-8-sig') as fh:
        # We want to adjust the config before storing it!
        config = json.load(fh)
        config["pullRequestSecurity"] = {}

        client.put_parameter(
            Name=f"/runners/{repo}/{index}/config",
            Type="String",
            Value=json.dumps(config, indent=2),
        )

    with open(".credentials", encoding='utf-8-sig') as fh:
        client.put_parameter(Name=f"/runners/{repo}/{index}/credentials", Type="String", Value=fh.read())

    with open(".credentials_rsaparams", encoding='utf-8-sig') as fh:
        client.put_parameter(Name=f"/runners/{repo}/{index}/rsaparams", Type="SecureString", Value=fh.read())