### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

Localstack prints a python stack error when attempting to save a large lambda (>1G) via "pod save".   It references S3, but that is a red-herring.  Once this error is encountered, the pod save exits leaving other services absent from the file.

### Expected Behavior

A services should be saved to the file.

### How are you starting LocalStack?

With the `localstack` script

### Steps To Reproduce

localstack start -d
awslocal lambda create-function  --function-name kinesisToElasticSearch  --zip-file fileb://kinesisToElasticSearch.zip --handler index.handler --runtime nodejs12.x --role arn:aws:iam::000000000000:role/lambda-role --region us-east-1
localstack pod save file://$PWD/localstack.pod


### Environment

```markdown
- OS:MacOS Ventura 13.2.1
- LocalStack: 2.0.1.dev
```


### Anything else?

Note if you delete the lambda, the problem still occurs.   I have not determined the exact limit on the lambda zip file.

Output

2023-04-04T23:51:16.437  WARN --- [-functhread3] hypercorn.error            : ASGI Framework Lifespan error, continuing without Lifespan support
2023-04-04T23:51:16.437  WARN --- [-functhread3] hypercorn.error            : ASGI Framework Lifespan error, continuing without Lifespan support
2023-04-04T23:51:16.438  INFO --- [-functhread3] hypercorn.error            : Running on https://0.0.0.0:4566 (CTRL + C to quit)
2023-04-04T23:51:16.438  INFO --- [-functhread3] hypercorn.error            : Running on https://0.0.0.0:4566 (CTRL + C to quit)
Ready.
2023-04-04T23:52:32.051  INFO --- [   asgi_gw_0] localstack.request.aws     : AWS lambda.CreateFunction => 201
2023-04-04T23:52:32.126  INFO --- [   asgi_gw_2] localstack.request.aws     : AWS sts.AssumeRole => 200
2023-04-04T23:52:43.746  INFO --- [   asgi_gw_2] localstack.request.http    : GET / => 200
2023-04-04T23:52:43.797 ERROR --- [   asgi_gw_0] l.pods.manager             : Error while saving state of service s3 into pod
Traceback (most recent call last):
File "/opt/code/localstack/.venv/lib/python3.10/site-packages/localstack_persistence/pods/manager.py", line 15, in extract_into
try:A.accept_state_visitor(E)
File "/opt/code/localstack/localstack/services/plugins.py", line 145, in accept_state_visitor
ReflectionStateLocator(service=self.name()).accept_state_visitor(visitor)
File "/opt/code/localstack/localstack/state/inspect.py", line 133, in accept_state_visitor
visitor.visit(attribute)
File "/usr/local/lib/python3.10/functools.py", line 926, in _method
return method.__get__(obj, cls)(*args, **kwargs)
File "/opt/code/localstack/.venv/lib/python3.10/site-packages/localstack_persistence/pods/save.py", line 27, in _
G=os.path.join(constants.API_STATES_DIRECTORY,C,B,E,constants.MOTO_BACKEND_STATE_FILE)
File "/usr/local/lib/python3.10/posixpath.py", line 90, in join
genericpath._check_arg_types('join', a, *p)
File "/usr/local/lib/python3.10/genericpath.py", line 152, in _check_arg_types
raise TypeError(f'{funcname}() argument must be str, bytes, or '
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'
2023-04-04T23:52:43.805  INFO --- [   asgi_gw_0] localstack.request.http    : GET /_localstack/pods/state => 200
2023-04-04T23:52:44.031  INFO --- [   asgi_gw_2] localstack.request.http    : GET /_localstack/pods/environment => 200
"""
        Requests going to moto will never be subdomain based, as they passed through the VirtualHost forwarder.
        We know the bucket is in the path, we can directly return it.
        """
        path = urlparse(url).path
        return path.split("/")[1]
    @patch(moto_s3_responses.S3ResponseInstance.subdomain_based_buckets, pass_target=False)
    def subdomain_based_buckets(self, request):
        """
        Requests going to moto will never be subdomain based, as they passed through the VirtualHost forwarder
        """
        return False
    @patch(moto_s3_models.FakeBucket.get_permission)
    def bucket_get_permission(fn, self, *args, **kwargs):
        """
        Apply a patch to disable/enable enforcement of S3 bucket policies
        """
        if not s3_constants.ENABLE_MOTO_BUCKET_POLICY_ENFORCEMENT:
            return PermissionResult.PERMITTED
        return fn(self, *args, **kwargs)
def register_custom_handlers():
    serve_custom_service_request_handlers.append(s3_cors_request_handler)
    serve_custom_service_request_handlers.append(s3_presigned_url_request_handler)
    modify_service_response.append(S3Provider.service, s3_presigned_url_response_handler)