Best approach for applying aws credentials for both dev and prod env #1403
-
Hello, Sorry if the answer for this question was posted somewhere and I didn't see it. I don't really understand how should the aws credentials work in an android project. I've managed just to set them with StaticCredentialsProvider for now.
I'm only using them to make a request for RekognitionClient. The idea is that the access keys in my aws account seems to regenerate once per day. I've also tried to use EnvironmentCredentialsProvider() and ProfileCredentialsProvider() but it doesn't seem to work, even if I've configured the config and credentials files in my /.aws folder. In the same time I've read that they will not apply on a physical device. So I really don't know what to do next. Can someone please help me with this part? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Mobile authentication is a complex topic that's outside the scope of the AWS SDK for Kotlin. You are correct in thinking that StaticCredentialsProvider / Environment / Profile will not work as expected once your app is deployed to production. I would recommend checking out Amplify Android which is built on the AWS SDK for Kotlin and is AWS' preferred mechanism for interacting with AWS services from an Android device. |
Beta Was this translation helpful? Give feedback.
Mobile authentication is a complex topic that's outside the scope of the AWS SDK for Kotlin. You are correct in thinking that StaticCredentialsProvider / Environment / Profile will not work as expected once your app is deployed to production.
I would recommend checking out Amplify Android which is built on the AWS SDK for Kotlin and is AWS' preferred mechanism for interacting with AWS services from an Android device.