[{"data":1,"prerenderedAt":67},["ShallowReactive",2],{"pattern-cdk-cognito-apigateway-lambda":3,"pattern-group-cdk-cognito-apigateway-lambda":66},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":15,"extension":16,"framework":17,"gitHub":18,"highlight":6,"introBox":22,"language":26,"level":27,"meta":28,"patternArch":29,"patternGroup":6,"patternGroupLabel":6,"resources":56,"services":6,"stem":61,"testing":62,"videoId":6,"__hash__":65},"patterns\u002Fpatterns\u002Fcdk-cognito-apigateway-lambda.json","Amazon API Gateway authentication with the Amazon Cognito client credentials flow",null,{"text":8},[9],"cdk destroy",[11],"content\u002Fcontributors\u002Fsuhasini-krishnan-udayar.json",{"text":13},[14],"See the GitHub repo for detailed deployment instructions.","Secure service-to-service calls to an Amazon API Gateway API with an Amazon Cognito user pool, using the OAuth 2.0 client credentials grant.","json","AWS CDK",{"template":19},{"patternPath":20,"templateFile":21},"cdk-cognito-apigateway-lambda","lib\u002Fcdk-cognito-apigateway-lambda-stack.ts",{"headline":23,"text":24},"How it works",[25],"The sample project demonstrates how to use a Cognito User Pool as an Authorizer for an API hosted on API Gateway. The API is invoked using using an access token that is generated using the user pool app client credentials. If the token is valid, the returns a 200 response. For any invalid tokens, the API response with 401 error.","TypeScript","200",{},{"icon1":30,"icon2":35,"icon3":39,"icon4":43,"line1":47,"line2":51,"line3":54},{"x":31,"y":32,"service":33,"label":34},15,50,"icon-internet","Client",{"x":32,"y":36,"service":37,"label":38},22,"cognito","Amazon Cognito",{"x":32,"y":40,"service":41,"label":42},78,"apigw","Amazon API Gateway",{"x":44,"y":40,"service":45,"label":46},85,"lambda","AWS Lambda",{"from":48,"to":49,"label":50},"icon1","icon2","get token",{"from":48,"to":52,"label":53},"icon3","access token",{"from":52,"to":55},"icon4",{"bullets":57},[58],{"text":59,"link":60},"Generate access token","https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Ftoken-endpoint.html","patterns\u002Fcdk-cognito-apigateway-lambda",{"text":63},[64],"See the GitHub repo for detailed testing instructions.","KyUXnWLcaEjRle-oH44Jwaxjcx5ggd_PP4nrLbm2CMg",[],1790815437257]