While a lambda is still processing (archive unpacking etc), the lambda state should be set to "Pending" (currently "Active") and invocations to that lambda should fail (currently, it can end up in a inconsistent state in this case, like lambdas being executed without layers).

Lambda state should reflect the current internal state, and invocations should fail if not active.
method, path, headers, data, query_string_params=None, is_base64_encoded=False
):
    query_string_params = query_string_params or parse_request_data(method, path, "")
    
    headers = canonicalize_headers(headers)
    return {
        "path": path,
        "headers": dict(headers),
        "multiValueHeaders": multi_value_dict_for_list(headers),
        "body": data,
        "isBase64Encoded": is_base64_encoded,
        "httpMethod": method,
        "queryStringParameters": query_string_params or None,
        "multiValueQueryStringParameters": multi_value_dict_for_list(query_string_params) or None,
    }
def process_sns_notification(
    func_arn,
    topic_arn,
    subscription_arn,
    message,
    message_id,
    message_attributes,
    unsubscribe_url,
    subject="",
):
    event = {
        "Records": [