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.
return self.on_successful_invocation is not None or self.on_failed_invocation is not None
    def get_version(self, version):
        return self.versions.get(version)
    def max_version(self):
        versions = [int(key) for key in self.versions.keys() if key != self.QUALIFIER_LATEST]
        return versions and max(versions) or 0
    def name(self):
        
        return self.id.split(":")[6]
    def region(self):
        return self.id.split(":")[3]
    def arn(self):
        return self.id
    def get_qualifier_version(self, qualifier: str = None) -> str:
        if not qualifier:
            qualifier = self.QUALIFIER_LATEST
        return (
            qualifier
            if qualifier in self.versions
            else self.aliases.get(qualifier).get("FunctionVersion")
        )
    def qualifier_exists(self, qualifier):
        return qualifier in self.aliases or qualifier in self.versions
    def __str__(self):
        return "<%s:%s>" % (self.__class__.__name__, self.name())
class DynamoDB(Component):