Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

terrywarwar
Copy link
Contributor

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. The original file permission is rwxr-xr-x.

`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
@terrywarwar
Copy link
Contributor Author

Changed test test_copy_to_temp_dir

@codecov-io
Copy link

codecov-io commented Jan 27, 2018

Codecov Report

Merging #3112 into develop will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             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
Impacted Files Coverage Δ
...customizations/cloudformation/artifact_exporter.py 97.4% <100%> (ø) ⬆️
awscli/clidocs.py 98.37% <0%> (-0.21%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec69284...7cf60d3. Read the comment docs.

@vmadura
Copy link

vmadura commented Jan 13, 2019

+1 for this fix. Would be nice to merge this PR - it solves my problem.

@kdaily kdaily added cloudformation package-deploy customization Issues related to CLI customizations (located in /awscli/customizations) labels Mar 2, 2021
@kdaily
Copy link
Member

kdaily commented Mar 2, 2021

V326758308

@kdaily kdaily added the pr:needs-review This PR needs a review from a Member. label Mar 2, 2021
@stealthycoin stealthycoin mentioned this pull request Mar 22, 2021
@stealthycoin
Copy link
Contributor

Merged in #6034

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cloudformation package-deploy customization Issues related to CLI customizations (located in /awscli/customizations) pr:needs-review This PR needs a review from a Member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants