Git Product home page Git Product logo

lambda-mailer's People

Contributors

eahefnawy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lambda-mailer's Issues

Path must be a string (received undefined)

Hello,

I'm invoking the function from another lambda. The function is triggered, but the email doesn't succeed:

2017-04-25T00:06:57.273Z	13c6055f-294b-11e7-a972-e75138f1d5c4	TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.join (path.js:1211:7)
at Object.module.exports.run (/var/task/mailer.js:21:26)
at exports.handler (/var/task/index.js:6:10)

The invocation is done as this:

import * as aws from 'aws-sdk'
var lambda = new aws.Lambda();

          var params = {
            FunctionName: 'aws_lambda_mailer-dev',
            InvocationType: 'RequestResponse',
            LogType: 'Tail',
            Payload: '{ test: test }'
          };

          lambda.invoke(params, function(err, data) {
            if (err) {
              context.fail(err);
              console.log('Error sending message: ' + err);
            } else {
              context.succeed('Lambda message: '+ data.Payload);
              console.log('Lambda message: ' + data.Payload);
            }
          })

And in the logs I only get information about an error:

2017-04-25T07:16:05.932Z	04548153-2987-11e7-ac80-8186ddeda411	Lambda message:
{
    "errorMessage": "RequestId: 066b7a6c-2987-11e7-8954-c35459870107 Process exited before completing request"
}

Any idea about why the path might be undefined? When the function is invoked manually (via the test console) the path is found correctly.

Can we use SES

Instead of using Nodemailer module and authenticating with SMPT credentials can we use SES and allow the IAM policy to allow SendEmail?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.