def check_aws_config()

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


def check_aws_config():
    click.echo("Checking AWS account credentials")
    try:
        whoami = boto3.client("sts").get_caller_identity()
    except NoCredentialsError:
        click.echo("No AWS credentials found -- maybe you need to set AWS_PROFILE?", err=True)
        exit(1)

    if whoami["Account"] != "827901512104":
        click.echo("Wrong AWS account in use -- maybe you need to set AWS_PROFILE?", err=True)
        exit(1)