aws_lambda_dart_runtime_ns 0.0.2 aws_lambda_dart_runtime_ns: ^0.0.2 copied to clipboard
A powerful runtime to build AWS Lambda functions in Dart with native AWS events. Sound null safety.
Dart Runtime for AWS Lambda (Sound Null Safety) #
A 🎯 Dart Runtime for ƛ AWS Lambda
This package is based on the official aws-lambda-dart-runtime. It is a restructured version of the outdated official aws-lambda-dart-runtime adapted to the latest Dart SDK to make it easier to maintain.
Thanks to katallaxie and AWS Labs involved in the development of the original stuff!
You can read the official document too!
Features #
Read Introducing a Dart runtime for AWS Lambda
- Great performance
< 10ms
on event processing and< 50MB
memory consumption - No need to ship the Dart runtime
- Multiple event handlers
- Support for serverless framework
📦 Install #
You can easily add this package to your app.
dart pub add aws_lambda_dart_runtime_ns
dart pub get
ƛ Use #
import 'package:aws_lambda_dart_runtime_ns/aws_lambda_dart_runtime_ns.dart';
void main() => AwsLambdaRuntime()
..addHandler(FunctionHandler(
name: 'main.hello',
action: (context, event) {
// Do something here...
return InvocationResult(
requestId: context.requestId,
body: {
'statusCode': 200,
'message': 'Hello, World!',
},
);
},
))
..invoke();
License #
We 💙 Dart.