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.
import json
import logging
import time
from datetime import datetime
from localstack.utils.time import timestamp_millis
LOG = logging.getLogger(__name__)
class Component:
    def __init__(self, id, env=None):
        self.id = id
        self.env = env
        self.created_at = None
    def name(self):
        return self.id
    def __repr__(self):
        return self.__str__()
    def __str__(self):
        return "<%s:%s>" % (self.__class__.__name__, self.id)
class KinesisStream(Component):