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

[aws-lambda-python] Building fails: cp: preserving times for ‘/asset-output/.’: Operation not permitted for Python 3.8 runtime #9704

Closed
CarlosDomingues opened this issue Aug 14, 2020 · 2 comments · Fixed by #9763
Assignees
Labels
@aws-cdk/aws-lambda-python bug This issue is a bug. effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p1

Comments

@CarlosDomingues
Copy link

In order to fix #9324 , the bundling image used by aws-lambda-python now uses cp instead of rsync (which was not present in the container) to copy assets to the output folder. However, now I'm getting the following error:

cp: preserving times for ‘/asset-output/.’: Operation not permitted

Reproduction Steps

Same as before.

Environment

  • CLI Version: 1.58.0:
  • Framework Version: 1.58.0
  • Node.js Version: 13.11.0
  • OS: Windows 10
  • Language (Version): Python (3.8.2)
@CarlosDomingues CarlosDomingues added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 14, 2020
@CarlosDomingues
Copy link
Author

Did a quick test and I'm getting the same error for the Python 3.7 runtime.

@eladb
Copy link
Contributor

eladb commented Aug 17, 2020

@adamelmore can you please take a look?

@eladb eladb added effort/small Small work item – less than a day of effort p1 labels Aug 17, 2020
@SomayaB SomayaB added in-progress This issue is being actively worked on. and removed needs-triage This issue or PR still needs to be triaged. labels Aug 17, 2020
@mergify mergify bot closed this as completed in #9763 Aug 19, 2020
mergify bot pushed a commit that referenced this issue Aug 19, 2020
Fixes #9704.

`aws-lambda-python` originally used `rsync` to move lambda code into `/asset-output`, but I switched to `cp` in #9355 to resolve #9349 as `rsync` isn't installed in the python3.8 sam docker image.

This change introduces a Dockerfile derived from the `bundlingDockerImage` of the runtime which installs `rsync` if it's missing.

While this feels a bit heavy-handed, I had been planning to introduce a Dockerfile to setup a working pip cache after #9582 lands.

I'm also happy to take a different approach if you'd prefer, @eladb. 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
misterjoshua pushed a commit to misterjoshua/aws-cdk that referenced this issue Aug 19, 2020
Fixes aws#9704.

`aws-lambda-python` originally used `rsync` to move lambda code into `/asset-output`, but I switched to `cp` in aws#9355 to resolve aws#9349 as `rsync` isn't installed in the python3.8 sam docker image.

This change introduces a Dockerfile derived from the `bundlingDockerImage` of the runtime which installs `rsync` if it's missing.

While this feels a bit heavy-handed, I had been planning to introduce a Dockerfile to setup a working pip cache after aws#9582 lands.

I'm also happy to take a different approach if you'd prefer, @eladb. 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda-python bug This issue is a bug. effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants