New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any way to directly access the ad-hoc IAM access key ID & secret key? #337
Comments
@ffxsam no, cognito does not create IAM users. Cognito is essentially 2 services: User Pools and Federated Identity. The users are part of user pools and are it's own service. The permissions for that user are governed by the IAM role associated with them or their group: For the SDK directly, you can call it by just passing credentials: For API, you can essentially call any AWS API via the API category and it will take care of signing the URL for you: To access the IAM creds you can: Auth.currentCredentials()
.then(credentials => {
// access keys available on:
let creds = Auth.essentialCredentials(credentials)
}) |
BTW, this is related to #334 - as I may have to use S3 REST API directly to get fine-grained upload progress. |
Ah.. I just tried |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
If I understand Cognito correctly, it basically creates an ad-hoc IAM user every time someone authenticates, and uses that IAM user to access AWS services.. is that right?
Is there any way to access these strings directly? I have a special case where I don't think the AWS JS SDK is going to work for me, and I need to call the S3 REST API directly, in which case I'll have to formulate an AWS authorization header.
The text was updated successfully, but these errors were encountered: