3

I am exploring Amazon Cognito for one of my work related needs, I found this-aws cognito blog post about to access user pools via java script and this-aws cognito sdk on java, also this-use cases to access user pools in javascript

I am looking similar examples or something similar reference in Java , my objective is to change such java code to Lambda functions, and all such user pools access would be done from API Gateway(On backend Java based lambda functions would work).

Sumit Arora
  • 5,051
  • 7
  • 37
  • 57

2 Answers2

2

Please find this link from AWS Blogs which is the exact use case for Cognito User Pool you are looking for and a very detailed step by step guide to implement it. I tried it and it worked, only difference is the deployment code consumes much more resources on S3 and lambda than Js code hence a pricing factor. If you are looking for similar use case of java script here is a demo implementation for same. It should solve your problem.

BR

Jeet
  • 5,569
  • 8
  • 43
  • 75
1

The beta of Cognito User Pools does not support authentication using Java. Only iOS, Android and Javascript are supported at this time. There is a contributed pull request for node.js here which can be used with Lambda, but we are intentionally not exposing a Java SDK until General Availability because the authentication related apis are going to change.

perpil
  • 1,521
  • 7
  • 5
  • is there any update as today (Mar/2022) – hfc Mar 09 '22 at 07:22
  • @hfc If you are specifically looking to do SRP authentication in Java, you might look at this: https://stackoverflow.com/questions/67528443/cognito-srp-using-aws-java-sdk-v2-x as a starting place. – perpil Oct 12 '22 at 17:27