{"action":"created","issue":{"url":"https://api.github.com/repos/lambci/docker-lambda/issues/51","repository_url":"https://api.github.com/repos/lambci/docker-lambda","labels_url":"https://api.github.com/repos/lambci/docker-lambda/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/lambci/docker-lambda/issues/51/comments","events_url":"https://api.github.com/repos/lambci/docker-lambda/issues/51/events","html_url":"https://github.com/lambci/docker-lambda/issues/51","id":252444284,"number":51,"title":"Unable to import module 'lambda_function'","user":{"login":"jasonrhaas","id":7018237,"avatar_url":"https://avatars1.githubusercontent.com/u/7018237?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonrhaas","html_url":"https://github.com/jasonrhaas","followers_url":"https://api.github.com/users/jasonrhaas/followers","following_url":"https://api.github.com/users/jasonrhaas/following{/other_user}","gists_url":"https://api.github.com/users/jasonrhaas/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonrhaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonrhaas/subscriptions","organizations_url":"https://api.github.com/users/jasonrhaas/orgs","repos_url":"https://api.github.com/users/jasonrhaas/repos","events_url":"https://api.github.com/users/jasonrhaas/events{/privacy}","received_events_url":"https://api.github.com/users/jasonrhaas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2017-08-23T23:21:43Z","updated_at":"2017-08-25T03:15:55Z","closed_at":null,"body":"I'm trying to use this docker container to test out a Zappa + Flask deploy and having some issues.  I followed the instructions on the README, and I can't get the Lambda function to run properly.\r\n\r\nIs it not importing my Lambda code properly?  What is supposed to happen?\r\n\r\n`docker run -v $PWD:/var/task lambci/lambda:python3.6`\r\n\r\n```\r\nSTART RequestId: de56416b-9dfb-4a9f-b5e6-687af6593b61 Version: $LATEST\r\nUnable to import module 'lambda_function': No module named 'flask_restless'\r\nEND RequestId: de56416b-9dfb-4a9f-b5e6-687af6593b61\r\nREPORT RequestId: de56416b-9dfb-4a9f-b5e6-687af6593b61 Duration: 7 ms Billed Duration: 100 ms Memory Size: 1536 MB Max Memory Used: 19 MB\r\n\r\n{\"errorMessage\": \"Unable to import module 'lambda_function'\"}\r\n```\r\n\r\nHere is the docker-compose.yml file I am using:\r\n\r\n```\r\nversion: '3'\r\nservices:\r\n\r\n  lambda:\r\n    image: lambci/lambda:python3.6\r\n    volumes:\r\n      - $PWD:/var/task\r\n    environment:\r\n      - AWS_LAMBDA_FUNCTION_NAME=application\r\n\r\n  mariadb:\r\n    image: mariadb:latest\r\n    volumes:\r\n      - ./schema.sql:/docker-entrypoint-initdb.d/load.sql\r\n    environment:\r\n      - MYSQL_ROOT_PASSWORD=''\r\n      - MYSQL_DATABASE=''\r\n      - MYSQL_USER=''\r\n      - MYSQL_PASSWORD=''\r\n```"},"comment":{"url":"https://api.github.com/repos/lambci/docker-lambda/issues/comments/324813292","html_url":"https://github.com/lambci/docker-lambda/issues/51#issuecomment-324813292","issue_url":"https://api.github.com/repos/lambci/docker-lambda/issues/51","id":324813292,"user":{"login":"jasonrhaas","id":7018237,"avatar_url":"https://avatars1.githubusercontent.com/u/7018237?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonrhaas","html_url":"https://github.com/jasonrhaas","followers_url":"https://api.github.com/users/jasonrhaas/followers","following_url":"https://api.github.com/users/jasonrhaas/following{/other_user}","gists_url":"https://api.github.com/users/jasonrhaas/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonrhaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonrhaas/subscriptions","organizations_url":"https://api.github.com/users/jasonrhaas/orgs","repos_url":"https://api.github.com/users/jasonrhaas/repos","events_url":"https://api.github.com/users/jasonrhaas/events{/privacy}","received_events_url":"https://api.github.com/users/jasonrhaas/received_events","type":"User","site_admin":false},"created_at":"2017-08-25T03:15:55Z","updated_at":"2017-08-25T03:15:55Z","body":"@mhart I can run the command `zappa package` which does the magic and packages up everything into a .zip.  Can I then use the command you provided above?  Or do I need to unzip it somewhere or copy it over to the docker container?"}}
{"actor":{"display_login":"jasonrhaas"}}