Friday, 11 June 2021

Build API Gateway, Lambda, and Cognito

 


Command line login:

aws cognito-idp admin-initiate-auth --user-pool-id us-west-2_leb660O8L --client-id 1uk3tddpmp6olkpgo32q5sd665 --auth-flow ADMIN_NO_SRP_AUTH --auth-parameters USERNAME=myusername,PASSWORD=mypassword

Direct curl here

curl -X POST --data @user-data.json \
-H 'X-Amz-Target: AWSCognitoIdentityProviderService.InitiateAuth' \
-H 'Content-Type: application/x-amz-json-1.1' \
https://cognito-idp.<just-replace-region>.amazonaws.com/
file json user-data.json
{"AuthParameters" : {"USERNAME" : "sadfsf", "PASSWORD" : "password"}, "AuthFlow" : "USER_PASSWORD_AUTH", "ClientId" : "csdfhripnv7sq027kktf75"}

References:

https://www.youtube.com/watch?v=9BWezRlOjmA

How to secure Microservices on AWS with Cognito, API Gateway, and Lambda (freecodecamp.org)

auth-api-demo/aws-setup.md at master ยท csepulv/auth-api-demo (github.com)

Building fine-grained authorization using Amazon Cognito, API Gateway, and IAM | AWS Security Blog

Event-driven Serverless Architectures with AWS Lambda, SQS, DynamoDB, S3, and API Gateway | LaptrinhX

No comments:

Post a Comment

Implemented a Service to receive real time message from an API Webhook

 What is the webhook?  Ask Google :) ๐Ÿ˜…  This is my experience to build a Azure Function HTTP trigger to receive an event from SkyBox API W...