I'm trying to create user using python3.x and boto3 but end up with facing some issues
I've tried using "admin_create_user" even id didn't worked for me
import boto3
aws_client = boto3.client('cognito-idp',
region_name = CONFIG["cognito"]["region"]
)
response = aws_client.admin_create_user(
UserPoolId = CONFIG["cognito"]["pool_id"],
Username = email,
UserAttributes = [
{"Name": "first_name", "Value": first_name},
{"Name": "last_name", "Value": last_name},
{ "Name": "email_verified", "Value": "true" }
],
DesiredDeliveryMediums = ['EMAIL']
)
Error facing
pip install awscli --upgrade --user
aws configure
AWS Access Key ID [****************6GOW]:
AWS Secret Access Key [****************BHOD]:
Default region name [us-east-1]:
Default output format [None]:
Try this and you can also view your credentials in below paths.
sudo cat ~/.aws/credentials
[default]
aws_access_key_id = ******7MVXLBPHW66GOW
aws_secret_access_key = wKtT*****UqN1sO/1Pfn+BCrvNst*****695BHOD
sudo cat ~/.aws/config
[default]
region = us-east-1
or you can view all those in one place by aws configure list
command,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With