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.
def __init__(self, id):
        super(DynamoDBStream, self).__init__(id)
        self.table = None
class DynamoDBItem(Component):
    def __init__(self, id, table=None, keys=None):
        super(DynamoDBItem, self).__init__(id)
        self.table = table
        self.keys = keys
    def __eq__(self, other):
        if not isinstance(other, DynamoDBItem):
            return False
        return other.table == self.table and other.id == self.id and other.keys == self.keys
    def __hash__(self):
        return hash(self.table) + hash(self.id) + hash(self.keys)
class ElasticSearch(Component):
    def __init__(self, id):
        super(ElasticSearch, self).__init__(id)
        self.indexes = []
        self.endpoint = None
    def name(self):
        return self.id.split(":domain/")[-1]
class SqsQueue(Component):
    def __init__(self, id):
        super(SqsQueue, self).__init__(id)
    def name(self):
        return self.id.split(":")[-1]
class SnsTopic(Component):