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.
LAST_MODIFIED = datetime.datetime.utcnow()
    REVISION_ID = "e54dbcf8-e3ef-44ab-9af7-8dbef510608a"
    HANDLER = "index.handler"
    RUNTIME = "node.js4.3"
    TIMEOUT = 60
    FUNCTION_NAME = "test1"
    RETRY_ATTEMPTS = 5
    EVENT_AGE = 360
    DL_QUEUE = "arn:aws:sqs:us-east-1:000000000000:dlQueue"
    LAMBDA_OBJ = LambdaFunction(lambda_api.func_arn("test1"))
    def _create_function(self, function_name, tags=None):
        if tags is None:
            tags = {}
        self.LAMBDA_OBJ.versions = {
            "$LATEST": {
                "CodeSize": self.CODE_SIZE,
                "CodeSha256": self.CODE_SHA_256,
                "RevisionId": self.REVISION_ID,
            }
        }
        self.LAMBDA_OBJ.handler = self.HANDLER
        self.LAMBDA_OBJ.runtime = self.RUNTIME
        self.LAMBDA_OBJ.timeout = self.TIMEOUT
        self.LAMBDA_OBJ.tags = tags
        self.LAMBDA_OBJ.envvars = {}
        self.LAMBDA_OBJ.last_modified = self.LAST_MODIFIED
        self.LAMBDA_OBJ.role = self.ROLE
        self.LAMBDA_OBJ.memory_size = self.MEMORY_SIZE
    
    def test_put_function_event_invoke_config(self):