amazon-cognito

SAM Template - API Authorizor to use existing Cognito User Pool

北慕城南 提交于 2021-02-11 18:18:17
问题 UPDATE: Thanks for the help! I've updated the template.yml to include the Authorizer, but I'm getting an error still: HelloWorldApi: Type: AWS::Serverless::Api Properties: StageName: Prod Cors: "'*'" # Auth: # DefaultAuthorizer: MyCognitoAuthorizer # Authorizers: # MyCognitoAuthorizer: # UserPoolArn: arn:aws:cognito-idp:us-east-1:719235216593:userpool/my-user-pool-id HelloWorldFunction: Properties: CodeUri: hello-world/ Handler: app.lambdaHandler Runtime: nodejs10.x Events: HelloWorld: Type:

Is it possible to login to Amazon Cognito via REST API without using the SDK

前提是你 提交于 2021-02-11 14:53:32
问题 I'm looking at AWS Cognito documentaion here Authentication with a User Pool Actually I looked at many links in the documentation without finding clear information about this. In AWS Cognito, I successfully created user pool, app client and integrated signup and login in Android and iOS using the platform provided SDK (amplify). But I want to do that directly from REST client, for testing purposes to generate user tokens. I want to submit the required credentials, username and password and

AWS Cognito user able to sign in, but API “Does not exist” when using I can access using access token on console?

前提是你 提交于 2021-02-11 12:50:20
问题 Im a bit lost here and would love some help. I am trying to connect my React Native app to a basic Lambda function. I have no bother Registering a user, Confirming a user or Signing in. I can see all of these things in the Cognito Console. I also am able to test the access to the API with the Authorizers part of the API Gateway and get a Response Code: 200 with the correct email from cognito. Here is the code: async signIn(email: string, password: string) { try { //sign in the user const user

Cognito pre-authentication trigger

浪尽此生 提交于 2021-02-11 12:44:53
问题 is it possible to catch successful/unsuccessful login attempts of users in pre authenticaztion lambda trigger? I logged the event returned after user logs in and both fail/success login attempts displays the exact same response. 来源: https://stackoverflow.com/questions/61214765/cognito-pre-authentication-trigger

What is a safe and scalable way to exhaustively select all users from Amazon Cognito API in JavaScript?

允我心安 提交于 2021-02-11 08:50:23
问题 I am part of a small team working on a fairly small website with user accounts; there are about 100 users at this time. And we are using Amazon Cognito for user management. On our website there is a summary page which displays a list/table of all users and various attributes. However, there's a hard limit on the number of items returned by the Amazon Cognito listUsers API call, in this case 60. Luckily, the API call also returns a token to use to make subsequent calls if there are more users.

iOS AWS S3 Upload How To Retry Failed or Faulted Tasks?

廉价感情. 提交于 2021-02-10 05:45:06
问题 I'm utilizing the iOS AWS SDK's batch upload [AWSTask taskForCompletionOfAllTasks:tasks] The tasks array is an array of AWSTask *task = [self.transferManager upload:uploadRequest]; objects. Once the upload is complete I can enumerate through the array to check to see if all the tasks were successful or not. However, I can't seem to figure out how to retry a failed or faulted task. If I pass an array of failed tasks to taskForCompletionOfAllTasks it doesn't do anything with those tasks? The

How pass json value for admin-update-user-attributes operation via cli in aws?

让人想犯罪 __ 提交于 2021-02-09 11:19:34
问题 Consider the example: aws cognito-idp admin-update-user-attributes --user-pool-id myUserPollId --username myUser --user-attributes [{"Name": "custom:roles","Value": "ROLE1,ROLE2"}] --region us-east-1 This gets me error: Invalid JSON: [{Name: 回答1: You can always try using shorthand syntax: --user-attributes Name="custom:roles",Value="ROLE1,ROLE2" If you really want to use the JSON syntax, try this: --user-attributes '[{"Name" : "custom:roles","Value" : "ROLE1,ROLE2"}]' Ensure that the user

How pass json value for admin-update-user-attributes operation via cli in aws?

醉酒当歌 提交于 2021-02-09 11:19:07
问题 Consider the example: aws cognito-idp admin-update-user-attributes --user-pool-id myUserPollId --username myUser --user-attributes [{"Name": "custom:roles","Value": "ROLE1,ROLE2"}] --region us-east-1 This gets me error: Invalid JSON: [{Name: 回答1: You can always try using shorthand syntax: --user-attributes Name="custom:roles",Value="ROLE1,ROLE2" If you really want to use the JSON syntax, try this: --user-attributes '[{"Name" : "custom:roles","Value" : "ROLE1,ROLE2"}]' Ensure that the user

Which AWS services does AWS CloudFormer support?

百般思念 提交于 2021-02-08 15:18:32
问题 AWS CloudFormation offers a default stack named CloudFormer, a template creation tool. CloudFormer creates a CloudFormation template from your current AWS environment, allowing you to click which manually created resources to include in your template. The AWS CloudFormer documentation does not list the AWS services that CloudFormer supports. There is an announcement from 2013 (CloudFormer Now Supports Amazon VPC and More AWS Resources) that lists a subset of supported services, but there is

how to check if user already exist with same email or phone number while registration in Cognito user pool

馋奶兔 提交于 2021-02-08 10:46:48
问题 when new user register with same email and phone number user successfully registered in the Cognito user pool. so how can i check if user already exist with same email or phone number while registration in Cognito user pool This is my code for user registration in Cognito user pool result = client.sign_up( ClientId= clientId, Username= data['username'], Password= data['password'], UserAttributes=[ { 'Name': 'phone_number', 'Value': data['phone_number'], }, { 'Name': 'email', 'Value': data[