0

I am building an app with Flutter and my backend uses different services from AWS. I don't want to use the Amplify CLI because I don't need to create backends. I manage my backends with proprietary CDK logic that gives me more flexibility than Amplify.

I was wondering if anyone knows of complete documentation on how the amplifyconfiguration.dart file is supposed to be managed for each asset (Cognito, S3, and so on). Reading through the Amplify Docs I found this website with information about Cognito. Spoiler alert, the documentation is incomplete and if you use the config as specified you will get errors. For the config to work (if you are not using OAuth), you would need to have something like this:

const amplifyconfig = ''' {
 "UserAgent": "aws-amplify-cli/2.0",
 "Version": "1.0",
 "auth": {
 "plugins": {
 "awsCognitoAuthPlugin": {
 "IdentityManager": {
 "Default": {}
 },
 "CredentialsProvider": {
 "CognitoIdentity": {
 "Default": {
 "PoolId": "[COGNITO IDENTITY POOL ID]",
 "Region": "[REGION]"
 }
 }
 },
 "CognitoUserPool": {
 "Default": {
 "PoolId": "[COGNITO USER POOL ID]",
 "AppClientId": "[COGNITO USER POOL APP CLIENT ID]",
 "Region": "[REGION]"
 }
 },
 "Auth": {
 "Default": {
 "authenticationFlowType": "USER_SRP_AUTH",
 "socialProviders": [],
 "usernameAttributes": ["EMAIL"],
 "signupAttributes": ["BIRTHDATE"],
 "passwordProtectionSettings": {
 "passwordPolicyMinLength": 8,
 "passwordPolicyCharacters": []
 }
 }
 }
 }
 }
 }
}''';

When you try to implement Amplify without the CLI on a React application there is modestly good documentation on how the config file should be managed; you can find it here. I was wondering if anyone knows of something similar for Flutter. I feel the Amplify documentation is lacking when going for a more "vanilla" integration that doesn't utilize the CLI.

It would be great if someone from the Amplify team could shed some light on this.

asked Sep 25, 2024 at 0:36

1 Answer 1

1

Agree, it's difficult to get what needs to be put in the config if we don't use CLI.

Here are few links, which may help you to construct valid configuration in dart file.

For Auth and Data category, this configuration is available on Amplify website.

  1. Auth configuration
  2. Data configuration
answered Sep 25, 2024 at 6:20
Sign up to request clarification or add additional context in comments.

3 Comments

Cool, thanks for the references!
@RamonOrraca - If the answer has helped you, can you please accept and upvote it?
I won't accept the answer because it doesn't completely solve the issue (there are many configs we still don't know), but I'm happy to give an upvote!

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.