Hello Everyone
I am currently working on a serverless backend using AWS Lambda and API Gateway. On the frontend side there are two developers, iOS and Android. I decided to use Cognito for our Auth and I am trying to provide the app developers with the correct documentation for them to follow. Also, I am trying to have minimum friction between the app developers and the backend.
Anyways, when I visit the AWS Mobile SDK Documentation page https://docs.aws.amazon.com/mobile-sdk/ , both the SDKs for iOS and Android redirect me to the AWS Amplify framework's website. I have previously used Amplify for a web based app and loved it. However, when I visit the iOS and Android "getting started" pages I find a note saying that Amplify iOS and Android are "in preview mode and not intended for production usage at this time". That said, When I went to the "Android/iOS SDK 2.0" pages I realised that one of the prerequisites is "installing and configuring Amplify CLI" .
My questions are:
I would also appreciate if anyone could share a production-supported step-by-step tutorial for integrating iOS/Android with Cognito?
Thanks
@Tee88
I would also appreciate if anyone could share a production-supported step-by-step tutorial for integrating iOS/Android with Cognito?
https://github.com/awslabs/aws-sdk-ios-samples
https://github.com/awslabs/aws-sdk-android-samples
This is how I'm calling it
const user = {
name: 'test',
email: 'test@test.com'
};
await Auth.federatedSignIn('okta', { token: token, expires_in: expires_in }, user);
where okta
is the name of the provider that is in the token.
token
is the idtoken
from okta
I'm working with Amplify Auth lambda triggers, and looking at the documentation
Errors thrown by Lambda triggers will be visible directly to your end users if they are using Amazon Cognito Hosted UI as query parameters in the Callback URL. As a recommended best practice, end user facing errors should be thrown from the Lambda triggers and any sensitive or debugging information should be logged in the Lambda trigger itself.
I don't understand what that means. I'm looking at the example files, and they all do different things, some console.warn
, some callback("error text");
, some callback(new Error("error text", event);
Can someone explain in simpler language what an end user facing error is?
aws-amplify
is the full sdk, the@aws-amplify/***
is just the relevent bits. So if all you are using is api then you can just import that.
Thanks @quickliketurtle
When I import API from @aws-amplify/api and import Auth from @aws-amplify/auth, I get 'No credentials available, the request will be unsigned'
when using API to send a post request to an API Gateway endpoint.
callback(new Error(Invalid email domain: ${domain}), event);
so I guess that's the style I'm going to go with, though I wonder if I should do a console.log
as well
Can anyone point me in the right direction to more information about how to use the ModelTodoFilterInput
? @dantasfiles provided some links to Query and Scan, but I wasn't able to put it together.
What I have is a Storage.list -operation that returns an array of 5 object. Each of these has a key-value pair. I would like to filter the response, so that I only get the 4 objects where the value partially matches a given string.
Eg.
// Given string: "filename1"
{
key: "path/filename1.jpg" // match
...
key: "path/filename2.jpg" // no match
...
key: "path2/filename1.jpg" // match
}
Expected response:
{
key: "path/filename1.jpg",
key: "path2/filename1.jpg"
}
amplify publish
as you have no frontend to publish to s3. So you should be using amplify push
to deploy your backend.
Hi everyone, I'm building a webapp with Amplify and I need a bucket with multiple folders.
Each folder must be accessible only by a specific Cognito group.
For example
Mybucket/firstClient
Mybucket/secondClient
And I have firstClient and secondClient cognito groups with multiple users inside.
Is there a way to model such a policy? Or is there another way to accomplish this?