How to use AWS Amplify Flutter Client Side Libraries only without the rest of Amplify?

91 views Asked by At

What I was trying to do:

I wanted to use AWS Amplify Flutter client side libraries just because they are the only official libraries for interaction with AWS cognito, s3, and lambda from my flutter mobile app. To explain a bit further:

  • I already have backend infrastructure deployed via AWS CDK, which I think has more complexity already than amplify can manage on its own. So I don't want to use amplify for any resource management because it would only make the infrastructure as code and cicd process more complex.
  • So I just wanted to use flutter amplify library to do these things:
    1. interact with aws cognito
    2. interact with lambda and s3 using the temp authorization creds gotten from logging in with cognito
  • I thought that the flutter amplify libraries used in my app frontend should only need to know the cognito userpool id, identity pool id, and user pool client id. I also thought that I shouldn't need to create an iam user for amplify, install amplify cli, etc... because amplify wouldn't be managing any infrastructure.

My Question(s):

  • Is what I described above possible, and if so how can I setup my amplifyconfiguration.dart and any other necessary configurations without having amplify cli need an amplify iam user, need to login to my aws account, nor need to spin up resources?

Elaborating on this question:

  • I think I should be able to do what I described above. Maybe I'm wrong if the amplify service is actually doing something just by my using its client libraries to assist interaction with cognito, s3, lambda and despite my not using amplify to manage any infrastructure.

  • If I can do what I described above, I think I should just need to properly configure amplifyconfiguration.dart with my cognito userpool id, identity pool id, and user pool client id, perhaps the account id where these resources exist, s3 bucket id/name, lambda id, idk. However, the only docs about configuring this use the amplify cli to do amplify init, which then tries to login to my aws account and spin up resources.

What I've tried:

0

There are 0 answers