Incorrect permissions on chalice/app.py and chalice/__init__.py
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
When using `chalice deploy` to deploy a project from Mac OS 11.1, the permissions of files `chalice/app.py` and `chalice/__init__.py` that are packaged by chalice are not open enough, leading to the following error:

If you look at the deployment it becomes apparent that `chalice/app.py` and `chalice/__init__.py` do not have 644 permissions as required by lambda:

I was able to fix this by simply using `chmod 644` to change the permissions on chalice source code:

Now it is packaged with the appropriate level of permissions:

Not sure what the best way forward would be as far as making sure the permissions are correct by default when installing chalice with pip, but I figured I would at least post this to give a solution for others running in to the same issue.
Contributor guide
Research direction
Start by inspecting how `chalice deploy` packages `chalice/app.py` and `chalice/__init__.py`, then reproduce the deployment on Mac OS 11.1. Compare the packaged file permissions with the required 644 permissions and verify that a deployment completes without the reported Lambda error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- build-system, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100