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.
"""Convert message attribute details (first characters) to lower case (e.g., stringValue, dataType)."""
    message_attrs = message_attrs or {}
    for _, attr in message_attrs.items():
        if not isinstance(attr, dict):
            continue
        for key, value in dict(attr).items():
            attr[first_char_to_lower(key)] = attr.pop(key)
    return message_attrs
def process_apigateway_invocation(
    func_arn,
    path,
    payload,
    stage,
    api_id,
    headers=None,
    is_base64_encoded=False,
    resource_path=None,
    method=None,
    path_params=None,
    query_string_params=None,
    stage_variables=None,
    request_context=None,
):
    if path_params is None:
        path_params = {}
    if request_context is None:
        request_context = {}