### Is there an existing issue for this?

- [X] I have searched the existing issues and read the documentation

### Question

Problem when following chalice tutorial with chalice-local and localstack:
https://aws.github.io/chalice/quickstart.html

```
DEBUG=1 localstack start

chalice-local new-project hello
cd hello/
chalice-local deploy

/home/raul/git_repos/provider-manager/venv/lib/python3.9/site-packages/_distutils_hack/__init__.py:30: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
Creating deployment package.
Creating IAM role: hello-dev
Creating lambda function: hello-dev
Creating Rest API
Resources deployed:
  - Lambda ARN: arn:aws:lambda:us-east-1:000000000000:function:hello-dev
  - Rest API URL: https://4yr9k2ce77.execute-api.us-east-1.amazonaws.com/api/


(venv) raul:~/.../provider-manager/hello (master) $ http http://localhost:4566/restapis/4yr9k2ce77/api/_user_request_/
HTTP/1.1 500 
Access-Control-Allow-Headers: authorization,cache-control,content-length,content-md5,content-type,etag,location,x-amz-acl,x-amz-content-sha256,x-amz-date,x-amz-request-id,x-amz-security-token,x-amz-tagging,x-amz-target,x-amz-user-agent,x-amz-version-id,x-amzn-requestid,x-localstack-target,amz-sdk-invocation-id,amz-sdk-request
Access-Control-Allow-Methods: HEAD,GET,PUT,POST,DELETE,OPTIONS,PATCH
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: etag,x-amz-version-id
Connection: close
Content-Length: 462
Content-Type: text/html; charset=utf-8
date: Fri, 06 May 2022 15:47:55 GMT
server: hypercorn-h11

{
    "errorMessage": "'stageVariables'",
    "errorType": "KeyError",
    "stackTrace": [
        "  File \"/var/task/chalice/app.py\", line 1238, in __call__\n    self.current_request = handler.create_request_object(event, context)\n",
        "  File \"/var/task/chalice/app.py\", line 1660, in create_request_object\n    self.current_request = Request(event, context)\n",
        "  File \"/var/task/chalice/app.py\", line 406, in __init__\n    self.stage_vars = event_dict['stageVariables']\n"
    ]
}

```



```
(venv) raul:~/.../provider-manager/hello (master) $ chalice --version
chalice 1.27.0, python 3.9.12, linux 5.15.0-27-generic
(venv) raul:~/.../provider-manager/hello (master) $ localstack --version
0.14.2.8
(venv) raul:~/.../provider-manager/hello (master) $ 
```



### Anything else?

_No response_
region = LambdaRegion.get()
    data = json.loads(request.data)
    signing_profile_version_arns = data.get("AllowedPublishers").get("SigningProfileVersionArns")
    code_signing_id = "csc-%s" % long_uid().replace("-", "")[0:17]
    arn = aws_stack.code_signing_arn(code_signing_id)
    region.code_signing_configs[arn] = CodeSigningConfig(
        arn, code_signing_id, signing_profile_version_arns
    )
    code_signing_obj = region.code_signing_configs[arn]
    if data.get("Description"):
        code_signing_obj.description = data["Description"]
    if data.get("CodeSigningPolicies", {}).get("UntrustedArtifactOnDeployment"):
        code_signing_obj.untrusted_artifact_on_deployment = data["CodeSigningPolicies"][
            "UntrustedArtifactOnDeployment"
        ]
    code_signing_obj.last_modified = format_timestamp()
    result = {
        "CodeSigningConfig": {
            "AllowedPublishers": {
                "SigningProfileVersionArns": code_signing_obj.signing_profile_version_arns
            },
            "CodeSigningConfigArn": code_signing_obj.arn,
            "CodeSigningConfigId": code_signing_obj.id,
            "CodeSigningPolicies": {
                "UntrustedArtifactOnDeployment": code_signing_obj.untrusted_artifact_on_deployment
            },