1 Respuesta
- Más nuevo
- Más votos
- Más comentarios
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
respondido hace 4 meses
Contenido relevante
- OFICIAL DE AWSActualizada hace un año
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace un año
- OFICIAL DE AWSActualizada hace 3 años