Describe the bug
When running the dynamodb template a docker error occurs:
docker.errors.APIError: 500 Server Error: Internal Server Error ("b'Mounts denied: \r\nThe path /Applications/PyCharm.app/Contents/helpers/pydev\r\nis not shared from OS X and is not known to Docker.\r\nYou can configure shared paths from Docker -> Preferences... -> File Sharing.\r\nSee https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.\r\n.'")
To reproduce
Expected behavior
Project exeuctes
Your Environment
I attempted a fix to adding pycharm app dir to docker however /Application isn't allowed:

Additional context
full stack:
/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/bin/sam local invoke --template /Users/pswenson/dev/sam/.aws-sam/build/template.yaml --event "/private/var/folders/zp/k26bd8kj34x0fkxjxnbkq4l9yt88sd/T/[Local] ReadDynamoDBEvent-event2.json" ReadDynamoDBEvent --debug-port 52240 --debugger-path /Applications/PyCharm.app/Contents/helpers/pydev --debug-args "-u /tmp/lambci_debug_files/pydevd.py --multiprocess --port 52240 --file"
2019-08-14 11:14:05 Invoking app.lambda_handler (python3.7)
2019-08-14 11:14:05 Found credentials in environment variables.
Fetching lambci/lambda:python3.7 Docker container image......
2019-08-14 11:14:06 Mounting /Users/pswenson/dev/sam/.aws-sam/build/ReadDynamoDBEvent as /var/task:ro,delegated inside runtime container
Traceback (most recent call last):
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/docker/api/client.py", line 261, in _raise_for_status
response.raise_for_status()
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.35/containers/4d4d3ae161303bdf039fcb1b4ed39c08f1fad593ec82fb2e438719ef10ad4589/start
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/bin/sam", line 11, in <module>
load_entry_point('aws-sam-cli==0.19.0', 'console_scripts', 'sam')()
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args[1:], **kwargs)
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/samcli/lib/telemetry/metrics.py", line 94, in wrapped
raise exception # pylint: disable=raising-bad-type
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/samcli/lib/telemetry/metrics.py", line 65, in wrapped
return_value = func(*args, **kwargs)
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/samcli/commands/local/invoke/cli.py", line 58, in cli
parameter_overrides) # pragma: no cover
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/samcli/commands/local/invoke/cli.py", line 102, in do_cli
stderr=context.stderr)
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/samcli/commands/local/lib/local_lambda.py", line 93, in invoke
self.local_runtime.invoke(config, event, debug_context=self.debug_context, stdout=stdout, stderr=stderr)
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/samcli/local/lambdafn/runtime.py", line 86, in invoke
self._container_manager.run(container)
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/samcli/local/docker/manager.py", line 98, in run
container.start(input_data=input_data)
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/samcli/local/docker/container.py", line 189, in start
real_container.start()
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/docker/models/containers.py", line 392, in start
return self.client.api.start(self.id, **kwargs)
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/docker/utils/decorators.py", line 19, in wrapped
return f(self, resource_id, *args, **kwargs)
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/docker/api/container.py", line 1091, in start
self._raise_for_status(res)
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/docker/api/client.py", line 263, in _raise_for_status
raise create_api_error_from_http_exception(e)
File "/usr/local/Cellar/aws-sam-cli/0.19.0/libexec/lib/python3.7/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 500 Server Error: Internal Server Error ("b'Mounts denied: \r\nThe path /Applications/PyCharm.app/Contents/helpers/pydev\r\nis not shared from OS X and is not known to Docker.\r\nYou can configure shared paths from Docker -> Preferences... -> File Sharing.\r\nSee https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.\r\n.'")
resolution: I simply added /Applications to file sharing in the docker preferences. Previously I was trying to just add pycharm but that wasn't allowed by the docker for mac client....

resolution: I simply added
/Applicationsto file sharing in the docker preferences. Previously I was trying to just add pycharm but that wasn't allowed by the docker for mac client....
Thank you. Solve the problem!
Most helpful comment
resolution: I simply added
/Applicationsto file sharing in the docker preferences. Previously I was trying to just add pycharm but that wasn't allowed by the docker for mac client....