#!/usr/bin/env python3
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0

import os

args = os.sys.argv[1:]

orig_name = os.environ.get('_HANDLER', '')  # Getting the original handler name
os.environ['_HANDLER'] = 'wrapper.lambda_handler'  # Setting the wrapper as the handler
os.environ['ORIG_NAME'] = orig_name  # Setting the original handler name as an environment variable

os.system(" ".join(args))  # Calling the original handler - Start the runtime
