1
votes

I was trying to implement signup with AWS Cognito and apparently something has changed on AWS since the last time I tried. I rely on 'cognito-idp' service (http://boto3.readthedocs.io/en/latest/reference/services/cognito-idp.html) which is not available anymore. Here is a list of all available services I can obtain through boto3:

['autoscaling', 'cloudformation', 'cloudfront', 'cloudhsm', 'cloudsearch', 'cloudsearchdomain', 'cloudtrail', 'cloudwatch', 'codedeploy', 'cognito-identity', 'cognito-sync', 'config', 'datapipeline', 'directconnect', 'ds', 'dynamodb', 'ec2', 'ecs', 'efs', 'elasticache', 'elasticbeanstalk', 'elastictranscoder', 'elb', 'emr', 'glacier', 'iam', 'importexport', 'kinesis', 'kms', 'lambda', 'logs', 'machinelearning', 'opsworks', 'rds', 'redshift', 'route53', 'route53domains', 's3', 'sdb', 'ses', 'sns', 'sqs', 'ssm', 'storagegateway', 'sts', 'support', 'swf', 'workspaces']

No 'cognito-idp ' anymore whatsoever. Are there any recent changes on AWS or am I missing something?

2

2 Answers

1
votes

You are using an older version of Boto3 (botocore) in which cognito-idp service is not supported. My installation which is not current supports cognito-idp, yours should be older than mine. Upgrade boto3 and you should see cognito-idp supported by Boto3.

>>> import boto3
>>> boto3.__version__
'1.4.0'
>>> boto3.Session().get_available_services()
['acm', 'apigateway', 'application-autoscaling', 'autoscaling', 'cloudformation', 'cloudfront', 'cloudhsm', 'cloudsearch', 'cloudsearchdomain', 'cloudtrail', 'cloudwatch', 'codecommit', 'codedeploy', 'codepipeline', 'cognito-identity', 'cognito-idp', 'cognito-sync', 'config', 'datapipeline', 'devicefarm', 'directconnect', 'discovery', 'dms', 'ds', 'dynamodb', 'dynamodbstreams', 'ec2', 'ecr', 'ecs', 'efs', 'elasticache', 'elasticbeanstalk', 'elastictranscoder', 'elb', 'elbv2', 'emr', 'es', 'events', 'firehose', 'gamelift', 'glacier', 'iam', 'importexport', 'inspector', 'iot', 'iot-data', 'kinesis', 'kinesisanalytics', 'kms', 'lambda', 'logs', 'machinelearning', 'marketplacecommerceanalytics', 'meteringmarketplace', 'opsworks', 'rds', 'redshift', 'route53', 'route53domains', 's3', 'sdb', 'servicecatalog', 'ses', 'snowball', 'sns', 'sqs', 'ssm', 'storagegateway', 'sts', 'support', 'swf', 'waf', 'workspaces']

>>> import botocore
>>> botocore.__version__
'1.4.56'
0
votes

This was very dumb, but I ran into this error because I wrote:

client = boto3.client('cognito_idp') [Note the underscore]

Rather than:

client = boto3.client('cognito-idp') [hyphen, no underscore]