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.
"{0}/functions/{1}/aliases".format(API_PATH_ROOT, self.FUNCTION_NAME),
            data=data,
        )
        result = json.loads(response.get_data())
        alias_arn = lambda_api.func_arn(self.FUNCTION_NAME) + ":" + self.ALIAS_NAME
        self.assertEqual(self.ALIASEXISTS_EXCEPTION, result["__type"])
        self.assertEqual(self.ALIASEXISTS_MESSAGE % alias_arn, result["message"])
    def test_update_alias(self):
        self._create_function(self.FUNCTION_NAME)
        self.client.post("{0}/functions/{1}/versions".format(API_PATH_ROOT, self.FUNCTION_NAME))
        self.client.post(
            "{0}/functions/{1}/aliases".format(API_PATH_ROOT, self.FUNCTION_NAME),
            data=json.dumps({"Name": self.ALIAS_NAME, "FunctionVersion": "1", "Description": ""}),
        )
        response = self.client.put(
            "{0}/functions/{1}/aliases/{2}".format(
                API_PATH_ROOT, self.FUNCTION_NAME, self.ALIAS_NAME
            ),
            data=json.dumps({"FunctionVersion": "$LATEST", "Description": "Test-Description"}),
        )
        result = json.loads(response.get_data())
        result.pop(
            "RevisionId", None
        )  
        expected_result = {
            "AliasArn": lambda_api.func_arn(self.FUNCTION_NAME) + ":" + self.ALIAS_NAME,
            "FunctionVersion": "$LATEST",
            "Description": "Test-Description",
            "Name": self.ALIAS_NAME,
        }