Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

fs.writefile example in aws lambda

var fs = require('fs');

exports.handler = function(event, context){
    fs.writeFile('/tmp/sample.txt', 'Hello File', function(err){
        fs.readdir('/tmp/', function(err, files){
            console.log(files);
            context.done(null, files);
        });
    });
};
Source by qiita.com #
 
PREVIOUS NEXT
Tagged: #aws #lambda
ADD COMMENT
Topic
Name
9+2 =