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

Error When function is imported #3

Open
bp2836 opened this issue Nov 3, 2016 · 4 comments
Open

Error When function is imported #3

bp2836 opened this issue Nov 3, 2016 · 4 comments

Comments

@bp2836
Copy link

bp2836 commented Nov 3, 2016

Dear Sir

I set up function as you have described and imported build.zip. I have this error when trying to edit:

Your Lambda function "week-day-startup" cannot be edited inline since the file name specified in the handler does not match a file name in your deployment package.

  1. i set up this schedule event:

{
"account": "",
"region": "eu-central-1",
"detail": {},
"detail-type": "Scheduled Event",
"source": "aws.events",
"time": "2016-11-03T16:30:00Z",
"id": "cdc73f9d-aea9-11e3-9d5a-835b769c0d9c",
"resources": [
"arn:aws:events:eu-central-1:
:rule/my-schedule"
]
}

Error reported is:

{
"errorMessage": "Cannot find module 'index'",
"errorType": "Error",
"stackTrace": [
"Function.Module._load (module.js:276:25)",
"Module.require (module.js:353:17)",
"require (internal/module.js:12:17)"
]
}

Please help to resolve above issues.

THanks
Bhara

@andrewmclagan
Copy link
Owner

Thats not enough information, can you please provide me with your complete setup.

@bp2836
Copy link
Author

bp2836 commented Nov 8, 2016

HI Andrew

Select Lambda from services in AWS
Create Lambda function
Select blank function
Select Next
Enter Name, Description, Node.js 4.3 for runtime
Select upload a .Zip file in code entry type
Update index handler as you have suggested for startup
Choose existing role
Memory 128 MB
Timeout 59 sec
Then error is reported as in my earlier post. There is an option to upload a new function on the same window. I have uploaded capture here:

  1. Configuration:

image

  1. Error page
    capture

Thanks
Bharat

@DmitryMaksakov
Copy link

DmitryMaksakov commented Jun 1, 2017

I have the same problem. The solution is pretty simple: you need to unzip archive from Here and upload dist/build.zip from unzipped archive to aws lambda function.

@andrewmclagan
Copy link
Owner

Ok i will investigate this in the next week or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants