amplify
start here: https://docs.amplify.aws/flutter/start/quickstart/
the docs say this is a pre-requisite: https://docs.amplify.aws/flutter/start/account-setup/
I followed this guide (https://docs.amplify.aws/flutter/start/account-setup/) up to step 6, at which point I got this error:
I realized this is because I was running the command outside of an amplify project. So I went back to the original guide https://docs.amplify.aws/flutter/start/quickstart/ and made the flutter project.
Now run:
Runnin the above command for the first time result in the error:
[InvalidCredentialError] Failed to load default AWS credentials
∟ Caused by: [CredentialsProviderError] Token is expired. To refresh this SSO session run 'aws sso login' with the corresponding profile.
Resolution: To configure a new Amplify profile, use npx ampx configure profile.
So i logged in with:
Tried running `` again, but then get the error:
npx ampx sandbox --outputs-format dart --outputs-out-dir lib
10:56:33 AM The region ap-south-1 has not been bootstrapped. Sign in to the AWS console as a Root user or Admin to complete the bootstrap process, then restart the sandbox.
10:56:33 AM If this is not the region you are expecting to bootstrap, check for any AWS environment variables that may be set in your shell or use --profile <profile-name> to specify a profile with the correct region.
Completed the 'bootstrap' process as per the instructions and ran npx ampx sandbox --outputs-format dart --outputs-out-dir lib↲ again.
That took a while and held up the terminal like this:
$ npx ampx sandbox --outputs-format dart --outputs-out-dir lib
10:56:33 AM The region ap-south-1 has not been bootstrapped. Sign in to the AWS console as a Root user or Admin to complete the bootstrap process, then restart the sandbox.
10:56:33 AM If this is not the region you are expecting to bootstrap, check for any AWS environment variables that may be set in your shell or use --profile <profile-name> to specify a profile with the correct region.
vector@ThinkPadP14s ~/sreema_admin_panel $ npx ampx sandbox --outputs-format dart --outputs-out-dir lib
Amplify Sandbox
Identifier: vector
Stack: amplify-adminpanel-vector-sandbox-704c753inc
Region: ap-south-1
To specify a different sandbox identifier, use --identifier
10:58:41 AM WARNING: Schema is using an @auth directive with deprecated provider 'iam'. Replace 'iam' provider with 'identityPool' provider.
10:58:41 AM
10:58:42 AM ✔ Backend synthesized in 4.35 seconds
10:58:47 AM ✔ Type checks completed in 5.47 seconds
10:58:59 AM ✔ Built and published assets
11:02:18 AM ✔ Deployment completed in 199.327 seconds
11:02:18 AM AppSync API endpoint = https://sfsafsdfjsdfoulv.appsync-api.ap-south-1.amazonaws.com/graphql
11:02:18 AM [Sandbox] Watching for file changes...
11:02:20 AM File written: lib/amplify_outputs.dart