mardi 13 octobre 2015

Amazon Lambda Node.js function to send Email - Security Issue

I have written an Amazon lambda (node js) function to send email.

Now, i am creating ses object as follows:

var aws = require('aws-sdk');
var ses = new aws.SES({
   accessKeyId: 'myAccessKey',
   secretAccesskey: 'mySecretKey',
   region: 'eu-west-1' 
});

exports.handler = function(event, context) {
...

How can i avoid embeding accessKeyId, secretAccessKey in this function? I guess IAM can be used for that. Any advice?




Aucun commentaire:

Enregistrer un commentaire