diff --git a/moto/cognitoidp/models.py b/moto/cognitoidp/models.py
--- a/moto/cognitoidp/models.py
+++ b/moto/cognitoidp/models.py
@@ -909,7 +909,7 @@ def to_json(self) -> Dict[str, Any]:
             "Name": self.name,
         }
 
-        if len(self.scopes) != 0:
+        if self.scopes:
             res.update({"Scopes": self.scopes})
 
         return res

diff --git a/tests/test_cognitoidp/test_cognitoidp.py b/tests/test_cognitoidp/test_cognitoidp.py
--- a/tests/test_cognitoidp/test_cognitoidp.py
+++ b/tests/test_cognitoidp/test_cognitoidp.py
@@ -3578,6 +3578,26 @@ def test_create_resource_server():
     assert ex.value.response["ResponseMetadata"]["HTTPStatusCode"] == 400
 
 
+@mock_cognitoidp
+def test_create_resource_server_with_no_scopes():
+    client = boto3.client("cognito-idp", "us-west-2")
+    name = str(uuid.uuid4())
+    res = client.create_user_pool(PoolName=name)
+
+    user_pool_id = res["UserPool"]["Id"]
+    identifier = "http://localhost.localdomain"
+    name = "local server"
+
+    res = client.create_resource_server(
+        UserPoolId=user_pool_id, Identifier=identifier, Name=name
+    )
+
+    assert res["ResourceServer"]["UserPoolId"] == user_pool_id
+    assert res["ResourceServer"]["Identifier"] == identifier
+    assert res["ResourceServer"]["Name"] == name
+    assert "Scopes" not in res["ResourceServer"]
+
+
 @mock_cognitoidp
 def test_describe_resource_server():
 

Cognito IDP/ create-resource-server: TypeError if no scopes are provided
If I try to create a ressource servers without scope Moto is crashing with the following error : 

```python
self = <moto.cognitoidp.models.CognitoResourceServer object at 0x1096a4750>

    def to_json(self) -> Dict[str, Any]:
        res: Dict[str, Any] = {
            "UserPoolId": self.user_pool_id,
            "Identifier": self.identifier,
            "Name": self.name,
        }
    
>       if len(self.scopes) != 0:
E       TypeError: object of type 'NoneType' has no len()

../venv/lib/python3.11/site-packages/moto/cognitoidp/models.py:909: TypeError
```

But per documentation https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cognito-idp/client/create_resource_server.html#create-resource-server the scope list is not required

tests/test_cognitoidp/test_cognitoidp.py::test_create_resource_server_with_no_scopes
tests/test_cognitoidp/test_cognitoidp.py::test_list_groups_when_limit_more_than_total_items tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_custom_attribute_required tests/test_cognitoidp/test_cognitoidp.py::test_admin_confirm_sign_up tests/test_cognitoidp/test_cognitoidp.py::test_get_user_unknown_accesstoken tests/test_cognitoidp/test_cognitoidp.py::test_update_user_pool tests/test_cognitoidp/test_cognitoidp.py::test_global_sign_out tests/test_cognitoidp/test_cognitoidp.py::test_list_identity_providers_when_max_items_more_than_total_items tests/test_cognitoidp/test_cognitoidp.py::test_admin_create_user_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_group_in_access_token tests/test_cognitoidp/test_cognitoidp.py::test_admin_setting_single_mfa tests/test_cognitoidp/test_cognitoidp.py::test_admin_initiate_auth__use_access_token tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_invalid_schema_values[invalid_max_value] tests/test_cognitoidp/test_cognitoidp.py::test_authorize_user_with_force_password_change_status tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pools_returns_next_tokens tests/test_cognitoidp/test_cognitoidp.py::test_user_authentication_flow tests/test_cognitoidp/test_cognitoidp.py::test_admin_remove_user_from_group_again_is_noop tests/test_cognitoidp/test_cognitoidp.py::test_idtoken_contains_kid_header tests/test_cognitoidp/test_cognitoidp.py::test_admin_list_groups_for_user tests/test_cognitoidp/test_cognitoidp.py::test_admin_disable_user_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_USER_PASSWORD_AUTH_unconfirmed_user tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_standard_attribute_with_changed_data_type_or_developer_only[standard_attribute] tests/test_cognitoidp/test_cognitoidp.py::test_respond_to_auth_challenge_with_invalid_secret_hash tests/test_cognitoidp/test_cognitoidp.py::test_add_custom_attributes tests/test_cognitoidp/test_cognitoidp.py::test_admin_enable_user tests/test_cognitoidp/test_cognitoidp.py::test_create_resource_server tests/test_cognitoidp/test_cognitoidp.py::test_admin_setting_mfa_totp_and_sms tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_string_schema_max_length_over_2048[invalid_max_length] tests/test_cognitoidp/test_cognitoidp.py::test_admin_create_user_with_existing_username_attribute_fails tests/test_cognitoidp/test_cognitoidp.py::test_list_users tests/test_cognitoidp/test_cognitoidp.py::test_forgot_password tests/test_cognitoidp/test_cognitoidp.py::test_list_users_inherent_attributes tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_domain_custom_domain_config tests/test_cognitoidp/test_cognitoidp.py::test_admin_reset_password_disabled_user tests/test_cognitoidp/test_cognitoidp.py::test_sign_up_existing_user tests/test_cognitoidp/test_cognitoidp.py::test_update_group tests/test_cognitoidp/test_cognitoidp.py::test_admin_delete_user_attributes_non_existing_pool tests/test_cognitoidp/test_cognitoidp.py::test_confirm_sign_up tests/test_cognitoidp/test_cognitoidp.py::test_admin_set_invalid_user_password[pa$$word] tests/test_cognitoidp/test_cognitoidp.py::test_admin_set_invalid_user_password[p2ssword] tests/test_cognitoidp/test_cognitoidp.py::test_add_custom_attributes_existing_attribute tests/test_cognitoidp/test_cognitoidp.py::test_list_users_returns_limit_items tests/test_cognitoidp/test_cognitoidp.py::test_admin_get_missing_user_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_sign_up_with_invalid_password[P2$s] tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_invalid_schema_values[invalid_min_value] tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_client_returns_secret tests/test_cognitoidp/test_cognitoidp.py::test_admin_get_user_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool__overwrite_template_messages tests/test_cognitoidp/test_cognitoidp.py::test_list_groups tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_attribute_partial_schema tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_custom_attribute_developer_only tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_hash_id_strategy_with_equal_pool_name tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_hash_id_strategy_with_different_pool_name tests/test_cognitoidp/test_cognitoidp.py::test_admin_get_missing_user tests/test_cognitoidp/test_cognitoidp.py::test_sign_up_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_setting_mfa_when_token_not_verified tests/test_cognitoidp/test_cognitoidp.py::test_admin_create_existing_user tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pool_clients tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pools_when_max_items_more_than_total_items tests/test_cognitoidp/test_cognitoidp.py::test_admin_set_invalid_user_password__custom_policy_provided[password] tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_default_id_strategy tests/test_cognitoidp/test_cognitoidp.py::test_forgot_password_nonexistent_client_id tests/test_cognitoidp/test_cognitoidp.py::test_admin_confirm_sign_up_non_existing_pool tests/test_cognitoidp/test_cognitoidp.py::test_authentication_flow_invalid_user_flow tests/test_cognitoidp/test_cognitoidp.py::test_list_resource_servers_empty_set tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_for_unconfirmed_user tests/test_cognitoidp/test_cognitoidp.py::test_list_users_in_group tests/test_cognitoidp/test_cognitoidp.py::test_list_users_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_authentication_flow_invalid_flow tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_USER_PASSWORD_AUTH tests/test_cognitoidp/test_cognitoidp.py::test_update_user_attributes_unknown_accesstoken tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_string_schema_min_bigger_than_max tests/test_cognitoidp/test_cognitoidp.py::test_list_groups_returns_pagination_tokens tests/test_cognitoidp/test_cognitoidp.py::test_admin_disable_user tests/test_cognitoidp/test_cognitoidp.py::test_admin_remove_user_from_group_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_admin_update_user_attributes tests/test_cognitoidp/test_cognitoidp.py::test_list_identity_providers_returns_next_tokens tests/test_cognitoidp/test_cognitoidp.py::test_change_password tests/test_cognitoidp/test_cognitoidp.py::test_admin_delete_user_attributes_non_existing_attribute tests/test_cognitoidp/test_cognitoidp.py::test_authentication_flow tests/test_cognitoidp/test_cognitoidp.py::test_admin_set_invalid_user_password__custom_policy_provided[P2$$word] tests/test_cognitoidp/test_cognitoidp.py::test_admin_user_global_sign_out_twice tests/test_cognitoidp/test_cognitoidp.py::test_admin_remove_user_from_group tests/test_cognitoidp/test_cognitoidp.py::test_admin_confirm_sign_up_non_existing_user tests/test_cognitoidp/test_cognitoidp.py::test_change_password_with_invalid_token_raises_error tests/test_cognitoidp/test_cognitoidp.py::test_describe_user_pool tests/test_cognitoidp/test_cognitoidp.py::test_describe_user_pool_resource_not_found tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_REFRESH_TOKEN tests/test_cognitoidp/test_cognitoidp.py::test_admin_add_user_to_group_again_is_noop tests/test_cognitoidp/test_cognitoidp.py::test_list_users_when_limit_more_than_total_items tests/test_cognitoidp/test_cognitoidp.py::test_admin_set_invalid_user_password[P2$S] tests/test_cognitoidp/test_cognitoidp.py::test_admin_resend_invitation_missing_user tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_invalid_schema_values[invalid_max_length] tests/test_cognitoidp/test_cognitoidp.py::test_admin_user_global_sign_out_unknown_userpool tests/test_cognitoidp/test_cognitoidp.py::test_admin_delete_user_attributes tests/test_cognitoidp/test_cognitoidp.py::test_change_password__using_custom_user_agent_header tests/test_cognitoidp/test_cognitoidp.py::test_describe_user_pool_domain tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pools tests/test_cognitoidp/test_cognitoidp.py::test_admin_delete_user_attributes_non_existing_user tests/test_cognitoidp/test_cognitoidp.py::test_update_identity_provider tests/test_cognitoidp/test_cognitoidp.py::test_admin_add_user_to_group tests/test_cognitoidp/test_cognitoidp.py::test_list_users_invalid_attributes tests/test_cognitoidp/test_cognitoidp.py::test_confirm_forgot_password_legacy tests/test_cognitoidp/test_cognitoidp.py::test_delete_group tests/test_cognitoidp/test_cognitoidp.py::test_update_user_pool_client tests/test_cognitoidp/test_cognitoidp.py::test_create_group_with_duplicate_name_raises_error tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pools_returns_max_items tests/test_cognitoidp/test_cognitoidp.py::test_update_identity_provider_no_identity_provider tests/test_cognitoidp/test_cognitoidp.py::test_list_users_in_group_returns_pagination_tokens tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_standard_attribute_with_changed_data_type_or_developer_only[developer_only] tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_USER_SRP_AUTH_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_admin_reset_password_and_change_password tests/test_cognitoidp/test_cognitoidp.py::test_get_user tests/test_cognitoidp/test_cognitoidp.py::test_list_resource_servers_multi_page tests/test_cognitoidp/test_cognitoidp.py::test_admin_set_invalid_user_password[Password] tests/test_cognitoidp/test_cognitoidp.py::test_confirm_forgot_password_opt_in_verification_invalid_confirmation_code tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_USER_SRP_AUTH tests/test_cognitoidp/test_cognitoidp.py::test_setting_mfa tests/test_cognitoidp/test_cognitoidp.py::test_forgot_password_user_with_all_recovery_attributes tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_hash_id_strategy_with_different_attributes tests/test_cognitoidp/test_cognitoidp.py::test_admin_delete_user_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_domain tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_USER_PASSWORD_AUTH_with_FORCE_CHANGE_PASSWORD_status tests/test_cognitoidp/test_cognitoidp.py::test_admin_reset_password_multiple_invocations tests/test_cognitoidp/test_cognitoidp.py::test_list_users_returns_pagination_tokens tests/test_cognitoidp/test_cognitoidp.py::test_list_resource_servers_single_page tests/test_cognitoidp/test_cognitoidp.py::test_admin_enable_user_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pool_clients_returns_max_items tests/test_cognitoidp/test_cognitoidp.py::test_confirm_forgot_password_with_non_existent_client_id_raises_error tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_custom_attribute_defaults tests/test_cognitoidp/test_cognitoidp.py::test_create_identity_provider tests/test_cognitoidp/test_cognitoidp.py::test_list_identity_providers tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_with_invalid_secret_hash tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pool_clients_returns_next_tokens tests/test_cognitoidp/test_cognitoidp.py::test_delete_user_pool_domain tests/test_cognitoidp/test_cognitoidp.py::test_admin_list_groups_for_user_with_username_attribute tests/test_cognitoidp/test_cognitoidp.py::test_admin_list_groups_for_user_ignores_deleted_group tests/test_cognitoidp/test_cognitoidp.py::test_list_users_incorrect_filter tests/test_cognitoidp/test_cognitoidp.py::test_get_group tests/test_cognitoidp/test_cognitoidp.py::test_list_identity_providers_returns_max_items tests/test_cognitoidp/test_cognitoidp.py::test_delete_user_pool_client tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_attribute_with_schema tests/test_cognitoidp/test_cognitoidp.py::test_admin_get_user tests/test_cognitoidp/test_cognitoidp.py::test_update_user_pool_client_returns_secret tests/test_cognitoidp/test_cognitoidp.py::test_confirm_sign_up_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_admin_user_global_sign_out tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_number_schema_min_bigger_than_max tests/test_cognitoidp/test_cognitoidp.py::test_update_identity_provider_no_user_pool tests/test_cognitoidp/test_cognitoidp.py::test_sign_up_with_invalid_password[p2$$word] tests/test_cognitoidp/test_cognitoidp.py::test_sign_up tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool tests/test_cognitoidp/test_cognitoidp.py::test_admin_resend_invitation_existing_user tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_unknown_attribute_data_type tests/test_cognitoidp/test_cognitoidp.py::test_describe_user_pool_client tests/test_cognitoidp/test_cognitoidp.py::test_update_user_pool_domain tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_invalid_auth_flow tests/test_cognitoidp/test_cognitoidp.py::test_global_sign_out_unknown_accesstoken tests/test_cognitoidp/test_cognitoidp.py::test_delete_user_pool tests/test_cognitoidp/test_cognitoidp.py::test_admin_delete_user tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_USER_PASSWORD_AUTH_user_not_found tests/test_cognitoidp/test_cognitoidp.py::test_admin_reset_password_unconfirmed_user tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_USER_PASSWORD_AUTH_user_incorrect_password tests/test_cognitoidp/test_cognitoidp.py::test_admin_add_user_to_group_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_admin_set_user_password tests/test_cognitoidp/test_cognitoidp.py::test_admin_reset_password_no_verified_notification_channel tests/test_cognitoidp/test_cognitoidp.py::test_set_user_pool_mfa_config tests/test_cognitoidp/test_cognitoidp.py::test_describe_identity_providers tests/test_cognitoidp/test_cognitoidp.py::test_describe_user_pool_estimated_number_of_users tests/test_cognitoidp/test_cognitoidp.py::test_admin_user_global_sign_out_unknown_user tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_custom_attribute_without_data_type tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_client tests/test_cognitoidp/test_cognitoidp.py::test_group_in_id_token tests/test_cognitoidp/test_cognitoidp.py::test_list_users_in_group_ignores_deleted_user tests/test_cognitoidp/test_cognitoidp.py::test_admin_create_user tests/test_cognitoidp/test_cognitoidp.py::test_delete_identity_providers tests/test_cognitoidp/test_cognitoidp.py::test_admin_initiate_auth_when_token_totp_enabled tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_should_have_all_default_attributes_in_schema tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pool_clients_when_max_items_more_than_total_items tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_invalid_schema_values[invalid_min_length] tests/test_cognitoidp/test_cognitoidp.py::test_describe_resource_server tests/test_cognitoidp/test_cognitoidp.py::test_update_user_attributes tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_invalid_admin_auth_flow tests/test_cognitoidp/test_cognitoidp.py::test_admin_create_user_with_incorrect_username_attribute_type_fails tests/test_cognitoidp/test_cognitoidp.py::test_token_legitimacy tests/test_cognitoidp/test_cognitoidp.py::test_forgot_password_admin_only_recovery tests/test_cognitoidp/test_cognitoidp.py::test_get_user_unconfirmed tests/test_cognitoidp/test_cognitoidp.py::test_confirm_forgot_password_opt_in_verification tests/test_cognitoidp/test_cognitoidp.py::test_login_denied_if_account_disabled tests/test_cognitoidp/test_cognitoidp.py::test_list_users_with_attributes_to_get tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_string_schema_max_length_over_2048[invalid_min_length] tests/test_cognitoidp/test_cognitoidp.py::test_list_users_in_group_when_limit_more_than_total_items tests/test_cognitoidp/test_cognitoidp.py::test_forgot_password_nonexistent_user_or_user_without_attributes tests/test_cognitoidp/test_cognitoidp.py::test_create_group tests/test_cognitoidp/test_cognitoidp.py::test_admin_setting_mfa_when_token_not_verified