Loading the Amazon API
AwsSum allows easy loading of further specific services so that you don't have to load all the code within AwsSum, just what you need. See for more details.
var awssum = require('awssum');
var amazon = awssum.load('amazon/amazon');
// now load a service
var S3 = awssum.load('amazon/s3').S3;
var Ec2 = awssum.load('amazon/ec2').Ec2;
var Ses = awssum.load('amazon/ses').Ses;
var Sqs = awssum.load('amazon/sqs').Sqs;
var Route53 = awssum.load('amazon/route53').Route53;
var CloudWatch = awssum.load('amazon/cloudwatch').CloudWatch;
var Rds = awssum.load('amazon/rds').Rds;
// ...etc ...
EndPoints
All Amazon services require an endpoint when talking to them. Usually each service is available in all regions,
however newer ones may only be available in a few regions to start off with. Also, in many cases (e.g. SES), the
service supports only one endpoint. In these cases, you do not need to provide it to the service constructor,
instead it is assumed for you to be US_EAST_1.
For example, for DynamoDB and Simple Email Service:
var ddb = new DynamoDB({
'accessKeyId' : accessKeyId,
'secretAccessKey' : secretAccessKey,
'awsAccountId' : awsAccountId, // optional
'region' : amazon.US_WEST_2 // required
});
var ses = new Ses({
'accessKeyId' : accessKeyId,
'secretAccessKey' : secretAccessKey,
'awsAccountId' : awsAccountId, // optional
// 'region' // assumed to be amazon.US_EAST_1
});
The following regions are defined in the 'amazon' module, but not all services are available in all of these regions. Please see the AWS Regions and Endpoints page for further details.
- US_EAST_1
- US_WEST_1
- US_WEST_2
- EU_WEST_1
- AP_NORTHEAST_1
- AP_SOUTHEAST_1
- SA_EAST_1
- US_GOV_WEST_1