Author: Henry

How to migrate the existing Cognito user pool to a different AWS account without asking users to reset their passwords

After my investigation, I found that you can use the user migration lambda trigger to import users into user pools without asking users to reset passwords. This approach enables seamless migration of users from your existing user pool to user pools in different AWS account when they use your new Amazon Cognito-enabled app for the first time, either during their…

Read More »

API Gateway REST APIs (Version 1) vs HTTP APIs (Version 2)

As you may know, there are two versions of APIs in API Gateway. API Gateway version 1 includes REST APIs only, whereas the API Gateway version 2 includes both WebSocket and HTTP APIs. HTTP APIs (V2) are designed for low-latency, cost-effective AWS Lambda proxy and HTTP proxy APIs. Previous-generation REST APIs (V1) currently offer more features, and full control over…

Read More »

Issue: got an Unauthorized (401) error when I use a NGINX proxy to access Kibana from outside of a VPC with Cognito authentication

To reproduce the issue in my environment, I created a VPC with a public subnet and a private subnet. Also I created an ES instance in the private subnet and an EC2 instance as Nginx server (with certs) in the public subnet. Then I setup cognito user pool and identity pool with Google federation. I noticed that the request is…

Read More »

Error: Unable to put integration response on ‘OPTIONS’ for resource at path ‘/{proxy+}’: Invalid mapping expression specified: Validation Result: warnings : [], errors : [Invalid mapping expression specified: ] (Service: AmazonApiGateway; Status Code: 400; Error Code: BadRequestException;

OK. Let’s get started with this issue. I would like to define an API Gateway with my lambda function using AWS Serverless Application Model (AWS SAM). However I get the error (Error: Unable to put integration response on ‘OPTIONS’ for resource at path ‘/{proxy+}’: Invalid mapping expression specified: Validation Result: warnings : [], errors : [Invalid mapping expression specified: ] (Service:…

Read More »