aws_lambda_dart_runtime 1.1.0 copy "aws_lambda_dart_runtime: ^1.1.0" to clipboard
aws_lambda_dart_runtime: ^1.1.0 copied to clipboard

A powerful runtime to build Lambda functions in Dart with native AWS events.

example/lib/main.dart

import 'package:aws_lambda_dart_runtime/aws_lambda_dart_runtime.dart';
import 'package:aws_lambda_dart_runtime/runtime/context.dart';

void main() async {
  /// This demo's handling an API Gateway request.
  final helloApiGateway = (Context context, AwsApiGatewayEvent event) async {
    final response = {'message': 'hello ${context.requestId}'};

    /// it returns an response to the gateway
    return AwsApiGatewayResponse.fromJson(response);
  };

  /// The Runtime is a singleton. You can define the handlers as you wish.
  Runtime()
    ..registerHandler<AwsApiGatewayEvent>('hello.apigateway', helloApiGateway)
    ..invoke();
}
25
likes
110
pub points
75%
popularity

Publisher

unverified uploader

A powerful runtime to build Lambda functions in Dart with native AWS events.

Repository (GitHub)
View/report issues
Contributing

Documentation

Documentation
API reference

License

Apache-2.0 (LICENSE)

Dependencies

http, json_annotation, meta

More

Packages that depend on aws_lambda_dart_runtime