Package Exports
- aws-sdk-fluent-builder
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (aws-sdk-fluent-builder) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Typescript fluent API for AWS SDK
Goal
The goal of this package is to simplify the use of the Javascript AWS SDK. AWS SDK node module is a verbose one and sometimes the needs of developers are really simple. It was originally designed in order to be used within serverless projects, especially for end-to-end testing of AWS lambdas.
It's an API based on the use of promises.
Examples
DynamoDB
const dynamoDbRepository = new DynamoDbBuilder()
.withTableName('foo')
.createIfNotExists()
.build();
dynamoDbRepository.findAll()
.then(results => console.log(results));SNS
const sns = new SnsBuilder()
.withTopicName('cartEvents')
.createIfNotExists()
.build();
sns.publishMessage({
type: 'ProductAddedToCart',
date: '2017-12-20 20:21:35',
version: '1',
...
});S3
const configurationService = new S3Builder()
.withBucketName('myBucket')
.createIfNotExists()
.asConfigurationService()
.build();
configurationService.get('configurationKey')
.then(configurationValue => console.log(configurationValue));const storageService = new S3Builder()
.withBucketName('myBucket')
.createIfNotExists()
.asStorageService()
.build();
storageService.listFiles()
.then(files => console.console.log(files));const hostingService = new S3Builder()
.withBucketName('myBucket')
.createIfNotExists()
.asHostingService()
.build();
hostingService.uploadFilesFromDirectory('/directory/path')
.then(result => console.log(result));Todos
- Fix packaging
- Fix S3 Configuration Service
- Add Cognito repository