coaws
v0.1.0
Published
co yield your amazon aws-sdk!
Downloads
11
Maintainers
Readme
coaws
A co-ready aws-sdk wrapper
Intended to function exactly the same as the aws-sdk
module, except you yield instead of pass in callbacks,
(intended to support all aws-sdk
services.)
Examples:
co = require 'co'
{S3} = require 'coaws'
s3 = new S3
accessKeyId: 'QWERTYUIOPASDFGHJKLZ'
secretAccessKey: 'QweRTyuIopasDfgHjKlzXcvBNm12q43wWERTY45E'
region: 'us-east-1'
co ->
list = yield s3.listBuckets()
console.log list
co = require 'co'
{SES} = require 'coaws'
ses = new SES
accessKeyId: 'QWERTYUIOPASDFGHJKLZ'
secretAccessKey: 'QweRTyuIopasDfgHjKlzXcvBNm12q43wWERTY45E'
region: 'us-east-1'
co ->
result = yield ses.sendMail
Destination: ToAddresses: ['[email protected]']
Message:
Subject: Data: 'Example'
Body:
Text: Data: 'This is an Example Email.'
Html: Data: '<h1 style="color:red;">This is an Example Email.</h1>'