### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

When trying to run chalice on localstack on the latest image I was having the same problem as in this issue https://github.com/localstack/localstack/issues/7964. After the update the problem changed to this one:

```
b'{"FunctionName": "sync", "FunctionArn": "arn:aws:lambda:us-east-1:000000000000:function:sync", "Runtime": "python3.9", "Role": "arn:aws:iam::000000000000:role/local", "Handler": "app.recurrentSync",
 "CodeSize": 31013564, "Description": "", "Timeout": 300, "MemorySize": 512, "LastModified": "2023-03-27T09:23:46.147967+0000", "CodeSha256": "yAvtez9/MH2+s+o31HmmMK83UbRAeOXxwVF8JiYhw04=", 
"Version": "$LATEST", "Environment": {"Variables": {"SQS_QUEUE_URL": "http://${LOCALSTACK_HOSTNAME}:4566", "PSQL_ADDRESS": "postgresql://user:password@localhost:5432/application", "BRICK_ENVIRONMENT": "sgs-staging", "DD_FLUSH_TO_LOG": "TRUE", "CSTOOL_ENVIRONMENT": "sgs-staging", "CSTOOL_KEY_ID": "7900", "CSTOOL_VALUE_ID": "2797", "ENVIRONMENT": "LOCAL", "CORS_ALLOWED_ORIGIN": "http://localhost:3000", "LOG_LEVEL": "DEBUG", "S3_WWE_BLUEPRINTS_BUCKET": "wl-blueprints", "S3_WWE_ASSETS_BUCKET": "wl-png", "SYNC_QUEUE": "sync-queue", "SYNC_QUEUE_REGION": "us-east-1", "FRONTEND_URL": "http://localhost:3000"}}, "TracingConfig": {"Mode": "PassThrough"}, "RevisionId": "5c5854b0-0b1c-43ed-898e-e7ca2d072ee3", 
"State": "Failed", "StateReason": "Error while creating lambda: Docker not available", "StateReasonCode": "InternalError", "LastUpdateStatus": "Failed", "PackageType": "Zip", "Architectures": ["x86_64"], "EphemeralStorage": {"Size": 512}, "SnapStart": {"ApplyOn": "None", "OptimizationStatus": "Off"}, "RuntimeVersionConfig": {"RuntimeVersionArn": "arn:aws:lambda:us-east-1::runtime:8eeff65f6809a3ce81507fe733fe09b835899b99481ba22fd75b5a7338290ec1"}}'
03/27/2023 06:23:51 AM DEBUG botocore.hooks Event needs-retry.lambda.GetFunctionConfiguration: calling handler <botocore.retryhandler.RetryHandler object at 0x7f95e6a80130>
03/27/2023 06:23:51 AM DEBUG botocore.retryhandler No retry needed.
Traceback (most recent call last):
  File "venv/lib/python3.9/site-packages/chalice/cli/__init__.py", line 636, in main
    return cli(obj={})
  File "venv/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "venv/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "venv/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "venv/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "venv/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "venv/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "venv/lib/python3.9/site-packages/chalice/cli/__init__.py", line 189, in deploy
    deployed_values = d.deploy(config, chalice_stage_name=stage)
  File "venv/lib/python3.9/site-packages/chalice/deploy/deployer.py", line 376, in deploy
    return self._deploy(config, chalice_stage_name)
  File "venv/lib/python3.9/site-packages/chalice/deploy/deployer.py", line 392, in _deploy
    self._executor.execute(plan)
  File "venv/lib/python3.9/site-packages/chalice/deploy/executor.py", line 42, in execute
    getattr(self, '_do_%s' % instruction.__class__.__name__.lower(),
  File "venv/lib/python3.9/site-packages/chalice/deploy/executor.py", line 55, in _do_apicall
    result = method(**final_kwargs)
  File "venv/lib/python3.9/site-packages/chalice/awsclient.py", line 412, in create_function
    self._wait_for_active(function_name)
  File "venv/lib/python3.9/site-packages/chalice/awsclient.py", line 419, in _wait_for_active
    waiter.wait(FunctionName=function_name)
  File "venv/lib/python3.9/site-packages/botocore/waiter.py", line 55, in wait
    Waiter.wait(self, **kwargs)
  File "venv/lib/python3.9/site-packages/botocore/waiter.py", line 375, in wait
    raise WaiterError(
botocore.exceptions.WaiterError: Waiter FunctionActive failed: Waiter encountered a terminal failure state: For expression "State" we matched expected path: "Failed"
```

### Expected Behavior

I expected that chalice-local should work correctly

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command, arguments, or `docker-compose.yml`)

    docker compose up -d

#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

    python /usr/local/bin/chalice-local deploy --stage local


### Environment

```markdown
- OS:"Ubuntu 22.04.1 LTS" on WSL
- LocalStack:latest
```


### Anything else?

_No response_
self, context: RequestContext, rest_api_id: String, resource_id: String, http_method: String
    ) -> Method:
        response: Method = call_moto(context)
        remove_empty_attributes_from_method(response)
        return response
    def put_method(