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

Lambda instructions for local devlopment #4

Open
mrhegemon opened this issue Oct 21, 2017 · 3 comments
Open

Lambda instructions for local devlopment #4

mrhegemon opened this issue Oct 21, 2017 · 3 comments
Assignees

Comments

@mrhegemon
Copy link
Member

No description provided.

@Blank113
Copy link

Blank113 commented Oct 21, 2017 via email

@kevinkhuat
Copy link

I have a way to run the generator lambda function locally. I was able to verify that a message was sent to my sqs account.

Here's the link to the file on my feature/lambda-test-4 branch
https://github.com/kevinkhuat/LifeScope-Core/blob/feature/lambda-test-4/lambda/generator/serverless.yml

Here's how I was able to test the lambda function locally.

  1. Install serverless globally
    npm install -g serverless
  2. Create a new queue in SQS
  3. Update the serverless.yml file with the queue url and mongo address
  4. Place your AWS Key and Secret values in ~/.aws/credentials
    They must be placed as the default profile
    [default]
    aws_access_key_id=
    aws_secret_access_key=
  5. cd into lambda/generator
  6. run npm install
  7. run command below to invoke locally
    serverless invoke local -f generator

So this is what I did to get things to work run locally for me. I don't think it's the perfect setup for everyone. I don't like how I had to hardcode the QUEUE_URL and mongo address within serverless.yml. I also don't like how I had to update ~/.aws/credentials, but this was the only way I could get it to work.

Anyways, would love some feedback on this.

@mrhegemon
Copy link
Member Author

This should be a good start. Will play around with it and see if I can improve it with some scripting.

@mrhegemon mrhegemon added this to the Release 1.0 milestone Nov 12, 2017
@mrhegemon mrhegemon removed this from the Release 1.0 milestone Apr 23, 2018
@mrhegemon mrhegemon reopened this Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants