简体   繁体   中英

Problem running lambda function locally with AWS SAM command on Fedora 32. Docker problem

Did anyone have any luck trying to properly install docker on Fedora 32 and run sam local commands? When I try to execute I get the following error every time:

ERROR Uncaught Exception {"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module '/var/task/....

The code runs perfectly on a debian based system, so it is not a problem with the code. It is a problem with the Fedora 32 docker installation.

Any help will be appreciated. Thanks

You might need to fix the permissions for your deployment package.

Run the following command in the CLI to fix the permissions recursively:

$ chmod 644 $(find /tmp/package_contents -type f)$ chmod 755 $(find /tmp/package_contents -type d)

Once you are done with fixing the permissions, upload the deployment package again and give it a try.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM