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.
response = {}
        if self.max_retry_attempts is not None:
            response["MaximumRetryAttempts"] = self.max_retry_attempts
        if self.max_event_age is not None:
            response["MaximumEventAgeInSeconds"] = self.max_event_age
        if self.on_successful_invocation or self.on_failed_invocation:
            response["DestinationConfig"] = {}
        if self.on_successful_invocation:
            response["DestinationConfig"].update(
                {"OnSuccess": {"Destination": self.on_successful_invocation}}
            )
        if self.on_failed_invocation:
            response["DestinationConfig"].update(
                {"OnFailure": {"Destination": self.on_failed_invocation}}
            )
        if not response:
            return None
        response.update(
            {
                "LastModified": timestamp_millis(self.last_modified),
                "FunctionArn": str(self.id),
            }
        )
        return response
    def clear_function_event_invoke_config(self):