aws-amplify / amplify-flutter

A declarative library with an easy-to-use interface for building Flutter applications on AWS.
https://docs.amplify.aws
Apache License 2.0
1.31k stars 243 forks source link

RFC: Dart wishlist on AWS (Lambda runtime, AWS Dart Service Clients) #3049

Open abdallahshaban557 opened 1 year ago

abdallahshaban557 commented 1 year ago

AWS Lambda is a popular compute service that enables developers to run their code without having to manage servers. Currently, AWS Lambda supports multiple programming languages, including JavaScript, Python, Java, and C#. However, Dart is not officially supported, despite being a widely used language for building cross-platform applications.

In response to the demand from Dart and Flutter developers to use Dart for building for building fullstack applications, we propose exploring the feasibility of:

  1. Supporting Dart as an official AWS Lambda runtime.
  2. Developing an official AWS Dart SDK, allowing developers to integrate directly with AWS services.

Please provide us with your feedback, starting with but not limited to:

jamilsaadeh97 commented 1 year ago

Hi @abdallahshaban557 , that's a really good thing to add in my opinion.

Personally I use Lambdas a lot to complement my application with some business logic.

To answer your questions:

DynamoDB and/or AppSync are found in 90% of my lambda functions to update items by listening to specific changes on a DynamoDB stream, post confirmation trigger to add a user to DynamoDB, . The rest is Pinpoint to send notification to specific users.

I prefer Amplify CLI I feel more comfortable using it since it's faster to set up everything from permissions to specifying what resources should access what.

I prefer with serverless functions. I don't have a reason why I do it this way, it's just the way I was introduced to when I first started using AWS and Amplify.

I feel it will be much better and efficient for dart and flutter developers to have the SDK in Dart. Speaking for myself, I will be the first one to migrate all my functions to Dart.

Thank you a lot for everything you guys do!

abdallahshaban557 commented 1 year ago

Hi @jamilsaadeh97 - thank you so much for your feedback!

peter100u commented 1 year ago

Compared to the new features you have proposed, I am more concerned about amplify studio-related functions and when they will be available to China. As far as I know, China is the second largest user group using flutter in the world, and then cannot use amplify-related services in China. I hope to further promote the development of this matter. Thank you very much.

abdallahshaban557 commented 1 year ago

Hi @peter100u - thank you for this feedback! Please feel free to open up a Github issue to the Amplify Studio team using this link

Schwusch commented 1 year ago

Which AWS services would you want to interact with using an AWS Dart SDK?

You could make a somewhat data driven decision based on the popularity of these packages.

Which use cases do you want to see supported on AWS Lambda with the Dart runtime?

Personally, I have used this package successfully for Lambdas triggered through API Gateway, deployed with SAM: https://pub.dev/packages/aws_lambda_dart_runtime It is somewhat cumbersome to deploy AOT compiled binaries, since Dart does not cross compile to other platforms, but it is seldom a problem at the companies I've worked at. The applications have been built/compiled in Linux pipelines, which is compatible with the provided runtime.

dnys1 commented 1 year ago

You could make a somewhat data driven decision based on the popularity of these packages.

Good call! 😄

Personally, I have used this package successfully for Lambdas triggered through API Gateway, deployed with SAM: pub.dev/packages/aws_lambda_dart_runtime

Yes, we are planning to adopt and improve on that package.

It is somewhat cumbersome to deploy AOT compiled binaries, since Dart does not cross compile to other platforms, but it is seldom a problem at the companies I've worked at. The applications have been built/compiled in Linux pipelines, which is compatible with the provided runtime.

Agreed. We will likely try to leverage Docker as much as possible to make this process less painful.

katallaxie commented 1 year ago

You could make a somewhat data driven decision based on the popularity of these packages.

Good call! 😄

Personally, I have used this package successfully for Lambdas triggered through API Gateway, deployed with SAM: pub.dev/packages/aws_lambda_dart_runtime

Yes, we are planning to adopt and improve on that package.

It is somewhat cumbersome to deploy AOT compiled binaries, since Dart does not cross compile to other platforms, but it is seldom a problem at the companies I've worked at. The applications have been built/compiled in Linux pipelines, which is compatible with the provided runtime.

Agreed. We will likely try to leverage Docker as much as possible to make this process less painful.

I had added https://github.com/katallaxie/serverless-dart as supporting infrastructure to the Dart Runtime for AWS Lambda at the time. But this was probably not the best companion.

In general, the decision between AOT and compiling at runtime is a decision between warm-up times in Lambda. I choose AOT at the time because it offered the best performance. But to avoid the tooling problem, it could also be at runtime.

cto-leaps commented 5 months ago

Any evolution on this project?

henryqum commented 3 months ago

Hi,

we building dart only apps and we using sqs, lambda runtime, and create and event on EventBridge scheduler using signature_v4 lib and http requests, we plan to use dynemoDB and we wish we had official libraries from aws save much time and headache and let you use more aws easily, there was once official lambda runtime

Thanks a lot