Closed ynaver-github closed 1 year ago
Instead of returning AWSMobileClient.getInstance
you need to build your own credentials using the AWSCredentialsProvider
interface with the accesskey/secretkey/token and try that out. With the session token you need to make sure you use an actual sts session creds provider so that it will handle fetching new credentials when the credential session expires.
It seems like this is the credentials provider you are looking for: https://www.javadoc.io/doc/com.amazonaws/aws-android-sdk-core/2.16.1/com/amazonaws/auth/STSSessionCredentialsProvider.html
1) android sample use congito but I like to use way such as AWS Security Token Service awslabs/amazon-kinesis-video-streams-webrtc-sdk-android
https://aws.amazon.com/ko/articles/authenticating-users-of-aws-mobile-applications-with-a-token-vending-machine/ AWS Security Token Service
is there any sample code for android ?
2) with cognitoIdentity ( pollId, identityId, token ), this there any android api to get Credentials ( AccessKeyId SecretKey: SessionToken ) ?