aws_lambda_dart_runtime_ns 0.0.13 copy "aws_lambda_dart_runtime_ns: ^0.0.13" to clipboard
aws_lambda_dart_runtime_ns: ^0.0.13 copied to clipboard

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

example/example.dart

import 'package:aws_lambda_dart_runtime_ns/aws_lambda_dart_runtime_ns.dart';

Future<void> main() async => await invokeAwsLambdaRuntime([
      _sayHelloWorldFunction,
      _doSomethingFunction,
    ]);

/// GET endpoint that just returns "Hello, World!".
FunctionHandler get _sayHelloWorldFunction => FunctionHandler(
      name: 'main.helloWorld',
      action: (context, event) {
        return InvocationResult(
          requestId: context.requestId,
          body: {
            'message': 'Hello, World!',
          },
        );
      },
    );

/// POST endpoint does something.
FunctionHandler get _doSomethingFunction => FunctionHandler(
      name: 'main.doSomething',
      action: (context, event) {
        // Do something here...

        return InvocationResult(requestId: context.requestId);
      },
    );
4
likes
160
pub points
57%
popularity

Publisher

verified publishershinyakato.dev

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

Repository (GitHub)
View/report issues

Topics

#aws #lambda #aws-lambda

Documentation

API reference

Funding

Consider supporting this project:

github.com

License

Apache-2.0 (license)

Dependencies

http

More

Packages that depend on aws_lambda_dart_runtime_ns