def lambda_handler()

in lambda/lambda_function.py [0:0]


def lambda_handler(event, context):

    aws_session = boto3.Session(region_name=REGION)
    sts_client = aws_session.client('sts')
    account_id = sts_client.get_caller_identity()["Account"]
    print("account id=" + account_id)
    apply_aws_auth_config_map(aws_session, REGION, account_id, CLUSTER_NAME, CFG_MAP_USER_NAME, CFG_MAP_ROLE_NAME,
                              CLUSTER_ROLE_NAME)
    print("aws auth config applied for given role/user.")