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

Working through learn-aws-lambda #13

Closed
13 tasks
ZooeyMiller opened this issue Jul 11, 2017 · 14 comments
Closed
13 tasks

Working through learn-aws-lambda #13

ZooeyMiller opened this issue Jul 11, 2017 · 14 comments
Assignees

Comments

@ZooeyMiller
Copy link
Collaborator

ZooeyMiller commented Jul 11, 2017

@finnhodgkin and I will be working through learn-aws-lambda today, this morning we have been working on issues in learn-amazon-web-services with time estimates in the issues on that repo.

I am estimating a day for learn-aws-lambda as it looks like quite a long repo. Any issues we raise will be individually time estimated as well and those time estimates are not necessarily contained in the day assigned to this issue.

EDIT: Due to overrunning the day time estimate, each of these chapters in learn-aws-lambda (apart from the ones already completed) will be made as individual issues and time estimated on their own.

  • Create a Lambda function inline - done, 25m
  • Create a Lambda function using a .zip folder - done, 25m
  • Create a Lambda function using the AWS API Gateway - done, ~5h
  • Trigger a Lambda function using an event from DynamoDB
  • Trigger a Lambda function using the Simple Notification System
  • Continuous Integration using Codeship
  • Testing Lambda Functions
  • Upload Lambda Function to S3 and deploy to Lambda
  • Deploying Lambda Functions using Gulp
  • Versioning and Aliasing Lambda Functions
  • Create an API with GET/POST Methods using Lambda functions to retrieve/update records from a DynamoDB table

We've struck through these parts as they are not relevant to the things mentioned in #13 (comment) so today will be working on:

Neither of these are already in the repo so we will have to make them from scratch.

@ZooeyMiller
Copy link
Collaborator Author

Our time estimate has been way off. We expected this to take 1 day but it is definitely going to take longer. We're currently around 1/4 of the way through due to doing a lot of independent research. Hopefully 2 days will be enough.

@nelsonic
Copy link
Member

@ZooeyMiller when ever you think an estimate is going to take longer than T1d (our max time estimate label) you know it's time to split it out into smaller issues/stories with detailed checklists. 👍

@finnhodgkin
Copy link
Collaborator

The aws API is not my favourite...

It seems like most of the code in this repo is out of date so most sections will need a fair bit of updating.

@ZooeyMiller
Copy link
Collaborator Author

@nelsonic apologies, I misinterpreted the t[x]d definition in https://github.com/dwyl/labels as meaning it was okay to create more time estimates, but will make sure not to in future 👍

@ZooeyMiller ZooeyMiller removed the T2d label Jul 11, 2017
@nelsonic
Copy link
Member

nelsonic commented Jul 11, 2017

@finnhodgkin if a lot is out-of-date, please only update the bits that are relevant to:

  • Creating a Lambda Function
  • Calling that Lambda Function when an email is received via SES.
  • Save the body of the email to S3 (the easiest for now...)

For context, we are going to be working on this: https://github.com/dwyl/aws-ses-lambda soon hence wanting to update the Lambda-related knowledge. 😉

@finnhodgkin
Copy link
Collaborator

finnhodgkin commented Jul 11, 2017

'A fair bit' was probs an exaggeration.

The menus have changed a little, but not so much that we should re-write the whole thing. The main change is in JS syntax - context.succeed() has been replaced by error first callbacks.

@nelsonic
Copy link
Member

@finnhodgkin yeah, the callback syntax is preferable but both are still valid. 😉
(if you have time to update and/or add a paragraph to .md file informing people that would be ace!)

@finnhodgkin
Copy link
Collaborator

@nelsonic oh that's strange- I was getting errors with context.succeed(). I'll check again when I get in to make sure it's not some other error, but the aws docs do say:

We strongly recommend updating any use of the context method and replacing it with the callback approach.

There's actually already a paragraph in there about callbacks vs context but it's quite far down the page. Might make more sense to move it up to the top.

@finnhodgkin
Copy link
Collaborator

Update: context.done/succeed definitely do still work so it must have been some other error.

Still worth converting all the snippets to callbacks at some point given the above recommendation from Amazon.

@finnhodgkin
Copy link
Collaborator

finnhodgkin commented Jul 12, 2017

I'm currently researching how to call a lambda when SES receives mail. There's nothing in learn-aws-lambda about SES so it's all new info 👍

Info here: dwyl/learn-aws-lambda#97

@ZooeyMiller
Copy link
Collaborator Author

@nelsonic with regards to dwyl/learn-aws-lambda#97 (comment) what should @finnhodgkin and I work on in the meantime?

@finnhodgkin
Copy link
Collaborator

While we wait for a response we'll go through aws-sdk-mock as suggested #10

@finnhodgkin
Copy link
Collaborator

We've done the thing where an email triggers a lambda function, but we're not 💯% clear that it's actually running. To test it we're going to make the lambda save something to S3, and then if that works we'll get the email body.

👍

@nelsonic
Copy link
Member

nelsonic commented Oct 7, 2024

I've recently used the guid to deploy a Lambda: nelsonic/github-scraper#128 🚀
Worked well. ✅
Closing as no further action on this issue. 📕

@nelsonic nelsonic closed this as completed Oct 7, 2024
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