-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
copy permission bits when single file defined in CodeUri #3112
Conversation
`CodeUri:` is set to a file (eg. golang compiled file), the file permissions are not copied across when packaged using `aws cloudformation package` and `aws cloudformation deploy`. The packaged file has these permission `-rw-r--r--`. I get the following error when test the lambda function. `{ "errorMessage": "fork/exec /var/task/main: permission denied", "errorType": "PathError" }` `shutil.copyfile` doesn't copy the file permission bits, however `shutil.copy` copies the permission bits.
…copy-with-permission copy permission bits when single file defined in CodeUri
Changed test |
Codecov Report
@@ Coverage Diff @@
## develop #3112 +/- ##
===========================================
- Coverage 95.93% 95.92% -0.01%
===========================================
Files 166 166
Lines 12616 12616
===========================================
- Hits 12103 12102 -1
- Misses 513 514 +1
Continue to review full report at Codecov.
|
+1 for this fix. Would be nice to merge this PR - it solves my problem. |
V326758308 |
Merged in #6034 |
CodeUri:
is set to a file (eg. golang compiled file), the file permissions are not copied across when packaged usingaws cloudformation package
andaws cloudformation deploy
. The packaged file has these permission-rw-r--r--
. I get the following error when test the lambda function.{ "errorMessage": "fork/exec /var/task/main: permission denied", "errorType": "PathError" }
shutil.copyfile
doesn't copy the file permission bits, howevershutil.copy
copies the permission bits. The original file permission isrwxr-xr-x
.