Skip to content

Using multiple Cognito Identity Pools to sign GraphQL requests #4019

@markfraserr

Description

@markfraserr

Hello team,

I am developing an iOS application using amplify-swift (version 2.46.0) with GraphQL APIs. My project is currently configured with a single Cognito Identity Pool via Amplify’s Auth configuration.

We are now attempting to introduce a second Cognito Identity Pool, and need the ability to dynamically authenticate and sign API requests with temporary AWS credentials from either of the two identity pools, depending on context.

I've attempted to import AWSCore directly to leverage the AWSCognitoCredentialsProvider class, however that has proven to be incompatible with our current version of amplify-swift.

Could you please advise what is the recommended approach for dynamically using multiple Cognito Identity Pools to obtain temporary credentials (accessKeyId, secretAccessKey, sessionToken) in a Swift-based Amplify app?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionGeneral question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions