1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
I actually found the solution to this after MANY hours of tracing and documentation. In all of the examples given to use Cognito authenticated identities with IoT Core pub/sub, there is one key API call left out:
id_client = boto3.client('cognito-identity')
id_response = id_client.get_id(
AccountId=os.getenv('AWS_ACCOUNT_ID'), -- AWS Account ID - I don't like this.
IdentityPoolId=os.getenv('COGNITO_IDENTITY_POOL_ID'),
Logins={
os.getenv('COGNITO_USER_POOL_URL'): idtoken --from initiate_auth authentication result
}
)
identityId = id_response['IdentityId'] -- You need this for the call to new_cognito(...)
This call comes after initiate_auth(...) and before auth.AwsCredentialsProvider.new_cognito(...) identity kwarg
répondu il y a 4 mois
Contenus pertinents
- demandé il y a un an
- demandé il y a 2 mois
- demandé il y a 7 mois
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans