fluent-aws
TypeScript icon, indicating that this package has built-in type declarations

0.20.0 • Public • Published

fluent-aws

A fluent, Promise based Amazon Web Services API, with a goal of being intuitive and easy to use.

The official AWS SDK is huge, and compatibility with it in fluent-aws will be added on a need-to-have basis for me personally. But pull requests to expand the SDK are most welcome!

Documentation: https://github.com/bolddp/fluent-aws/wiki/Documentation

Installation

npm install --save fluent-aws

Sample code

Configure and assume role

aws().region('eu-west-1').assumeRole({
  // Handy during development on dev computer
  roleArn: 'roleArn',
  sessionName: 'sessionName',
});

Fluent access across AWS services

// Bridge from ECS task to the EC2 container its running on
const ec2Instance = await aws()
  .ecs()
  .cluster('clusterArn')
  .task('taskArn')
  .ec2Instance()
  .awsData();

expect(ec2Instance.PublicIpAddress).toEqual('1.2.3.4');

Logical representation of AWS objects, e.g. a S3 bucket, for multiple operations on the same object

const bucket = aws().s3().bucket('bucketName').createIfNotExists();

await bucket.object('fileName').writeString('Howdy partner!');
const str = await bucket.object('fileName').readString();
await bucket.object('fileName').delete();

Readme

Keywords

none

Package Sidebar

Install

npm i fluent-aws

Weekly Downloads

100

Version

0.20.0

License

MIT

Unpacked Size

226 kB

Total Files

150

Last publish

Collaborators

  • bolddp