aws_client 0.2.0

  • Readme
  • Changelog
  • Installing
  • 75

High-level APIs for Amazon Web Services (AWS) in Dart #

Warning: incomplete, untested, but we accept pull requests :-)

Usage #

A simple usage example:

import 'package:aws_client/aws_client.dart';
import 'package:http_client/console.dart';

main() async {
  var httpClient = newHttpClient();
  var credentials = new Credentials(accessKey: 'MY_ACCESS_KEY', secretKey: 'MY_SECRET_KEY');
  var aws = new Aws(credentials: credentials, httpClient: httpClient);
  var queue = aws.sqs.queue('https://my-queue-url/number/queue-name');
  await queue.sendMessage('Hello from Dart client!');

How to contribute #

This library is not an official library from Amazon or Google. It is developed by best effort, in the motto of "Scratch your own itch!", meaning we have APIs here that we care about. Looking for contributions:

  • tests:

    • never put AWS credentials inside the code
    • read AWS credentials from environment variables in the beginning
    • provide description what setup it needs upfront
  • API documentation

  • New API contribution:

    • please open an issue ticket first about what you are planning to implement
    • take a look at the implementation of the others, most of the API calls will be similar
    • always include a link to AWS API docs

Changelog #

0.2.0 #

Thanks to kmcgill88:

  • Add support for Lambda invoke

0.1.3 #

Thanks to paulreimer and ipconfiger!

  • Allow 'service' field in AwsRequestBuilder constructor to override detection from uri.
  • URI-encoding for path in Request signature.
  • Create Queue api.
  • SNS Service API support.
  • Upgrade to http_client 1.0
  • Expanded lints.

0.1.2 #

  • Dart 2 support.

0.1.1 #

  • Updated to use http_client 0.3.0.

0.1.0 #

Breaking changes:

  • Updated to use http_client 0.2.0, which has a slightly different API to initialize the HTTP Client.

0.0.2 #

  • Enable url-form-encoding (for POST requests).
  • Use POST request for SQS methods (enables larger messages to be sent).

0.0.1 #

  • Initial version.
  • Support for 3 methods in SQS.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  aws_client: ^0.2.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:aws_client/aws_client.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 25, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health suggestions

Fix lib/src/request.dart. (-4.89 points)

Analysis of lib/src/request.dart reported 10 hints, including:

line 39 col 11: Unnecessary new keyword.

line 46 col 21: Unnecessary new keyword.

line 65 col 9: Unnecessary new keyword.

line 71 col 9: Unnecessary new keyword.

line 130 col 12: Unnecessary new keyword.

Fix lib/sqs.dart. (-2.96 points)

Analysis of lib/sqs.dart reported 6 hints, including:

line 28 col 38: Unnecessary new keyword.

line 48 col 28: Unnecessary new keyword.

line 123 col 28: Unnecessary new keyword.

line 135 col 35: Unnecessary new keyword.

line 152 col 28: Unnecessary new keyword.

Fix lib/sns.dart. (-2.48 points)

Analysis of lib/sns.dart reported 5 hints:

line 30 col 28: Unnecessary new keyword.

line 43 col 39: Unnecessary new keyword.

line 65 col 33: Unnecessary new keyword.

line 82 col 7: Unnecessary new keyword.

line 156 col 12: Unnecessary new keyword.

Fix lib/aws_client.dart. (-1 points)

Analysis of lib/aws_client.dart reported 2 hints:

line 30 col 16: Unnecessary new keyword.

line 33 col 29: Unnecessary new keyword.

Fix lib/s3.dart. (-1 points)

Analysis of lib/s3.dart reported 2 hints:

line 27 col 58: Unnecessary new keyword.

line 60 col 28: Unnecessary new keyword.

Maintenance suggestions

The package description is too short. (-15 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and aws_client.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
crypto ^2.0.1 2.1.4
http_client >=0.5.0 <2.0.0 1.3.1
meta ^1.0.0 1.1.8
xml ^3.0.0 3.7.0
Transitive dependencies
async 2.4.0
buffer 1.0.6
charcode 1.1.2
collection 1.14.12
convert 2.1.1
executor 2.2.0
http 0.12.0+4
http_parser 3.1.3
path 1.6.4
petitparser 3.0.0
source_span 1.6.0
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
pedantic ^1.0.0 1.9.0
test ^1.3.0