0.4.2 • Published 1 year ago
aws-sdk-fluent-builder v0.4.2
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')
.withPartitionKeyName('id')
.withSortKeyName('date')
.createIfNotExists()
.build();
const result = await dynamoDbRepository.findOnePartitionKeyAndSortKey('6325', '2020-01-01');
console.log(result);
SNS
const sns = new SnsBuilder()
.withTopicName('cartEvents')
.createIfNotExists()
.build();
await sns.publishMessage({
type: 'ProductAddedToCart',
date: '2017-12-20 20:21:35',
version: '1',
...
});
S3
const configurationService = new S3Builder()
.withBucketName('myBucket')
.createIfNotExists()
.asConfigurationService()
.build();
const configurationValue = await configurationService.get('configurationKey');
console.log(configurationValue);
const storageService = new S3Builder()
.withBucketName('myBucket')
.createIfNotExists()
.asStorageService()
.build();
const files = await storageService.listFiles();
console.console.log(files);
const hostingService = new S3Builder()
.withBucketName('myBucket')
.createIfNotExists()
.asHostingService()
.build();
await hostingService.uploadFilesFromDirectory('/directory/path');
Lambda
const lambdaService = new LambdaBuilder().withName('my-lambda-name').build;
const result = await lambdaService.invoke({attr: 'value'}); // no need to create the payload object
Todos
- FIX S3 Hosting which generates a 403 error
0.4.1
1 year ago
0.4.2
1 year ago
0.3.1
3 years ago
0.3.0
3 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.0
3 years ago
0.1.1
3 years ago
0.0.22
6 years ago
0.0.21
6 years ago
0.0.20
6 years ago
0.0.19
6 years ago
0.0.18
6 years ago
0.0.0
6 years ago
0.0.17
6 years ago
0.0.16
6 years ago
0.0.15
6 years ago
0.0.14
6 years ago
0.0.13
6 years ago
0.0.12
6 years ago
0.0.11
6 years ago
0.0.10
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago