aws-api-gateway

Is it possible for {proxy+} to capture “/” in API Gateway?

孤街浪徒 提交于 2020-02-03 18:59:12
问题 I'm trying to set up a basic reverse-proxy from http://foo.com to http://foo.internal:38121 using API Gateway (so I don't have to get involved w/ deploying NGINX clusters). I cannot just use CloudFront -> http://foo.internal:38121 without API Gateway, since I need to change http://foo.internal:38121 to something else on each deploy... and changing the CloudFront origin would trigger an untenable ~40 minute update. Furthermore, I cannot used fixed ports (so CloudFront w/ fixed origin and a DNS

CDK override bind when using LambdaIntegration

孤人 提交于 2020-02-03 10:21:31
问题 When using LambdaIntegration class the bind function add permission to the lambda automatically: bind(method) { super.bind(method); const principal = new iam.ServicePrincipal('apigateway.amazonaws.com'); const desc = `${method.restApi.node.uniqueId}.${method.httpMethod}.${method.resource.path.replace(/\//g, '.')}`; this.handler.addPermission(`ApiPermission.${desc}`, { principal, scope: method, sourceArn: method.methodArn, }); // add permission to invoke from the console if (this.enableTest) {

How can I use api gateway stages via cloudformation or sam?

北城以北 提交于 2020-02-03 09:57:28
问题 I am using AWS SAM to deploy my lambda and api gateway. Below is my template yaml file: AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: > sam-app Sample SAM Template for sam-app # More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst Globals: Function: Timeout: 3 Resources: HelloWorldFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs

How can I use api gateway stages via cloudformation or sam?

喜夏-厌秋 提交于 2020-02-03 09:56:09
问题 I am using AWS SAM to deploy my lambda and api gateway. Below is my template yaml file: AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: > sam-app Sample SAM Template for sam-app # More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst Globals: Function: Timeout: 3 Resources: HelloWorldFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs

How can I use api gateway stages via cloudformation or sam?

蹲街弑〆低调 提交于 2020-02-03 09:56:04
问题 I am using AWS SAM to deploy my lambda and api gateway. Below is my template yaml file: AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: > sam-app Sample SAM Template for sam-app # More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst Globals: Function: Timeout: 3 Resources: HelloWorldFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs

requestParameters returning “Invalid mapping expression specified: true”

时光总嘲笑我的痴心妄想 提交于 2020-02-03 08:28:54
问题 I'm configuring a lambda function's API gateway integration with the Serverless Framework version 0.4.2. My problem is with defining an endpoint's request parameters. The AWS docs for API gateway entry says: requestParameters Represents request parameters that can be accepted by Amazon API Gateway. Request parameters are represented as a key/value map, with a source as the key and a Boolean flag as the value. The Boolean flag is used to specify whether the parameter is required. A source must

How can integrate Cognito Identity Pool with API Gateway?

对着背影说爱祢 提交于 2020-02-02 02:14:09
问题 I have a question about the integration of Cognito and API Gateway and I hope that you can help me with that. I am thinking of making an application in which I would like the authentication process with third parties (Facebook, Twitter ...), so I discard Cognito User Pool, then I have Cognito Identity Pool, but this is where my doubts grow. How can I integrate it with API Gateway? Should I use API Gateway Custom Authorizer to manage the token generated by Cognito? If I do not use the Custom

AWS Api Gateway: get #hash (fragment identifier)

醉酒当歌 提交于 2020-01-30 07:51:25
问题 For example such GET: https://XXXXXX.execute-api.eu-west-1.amazonaws.com#my_hash=XXX I did not found any way to get my_hash 回答1: New knowledge every day - as it turned out by HTTP - the web browser do not send hash portion to the server. 来源: https://stackoverflow.com/questions/45238169/aws-api-gateway-get-hash-fragment-identifier

AWS Api Gateway: get #hash (fragment identifier)

谁说胖子不能爱 提交于 2020-01-30 07:51:07
问题 For example such GET: https://XXXXXX.execute-api.eu-west-1.amazonaws.com#my_hash=XXX I did not found any way to get my_hash 回答1: New knowledge every day - as it turned out by HTTP - the web browser do not send hash portion to the server. 来源: https://stackoverflow.com/questions/45238169/aws-api-gateway-get-hash-fragment-identifier

Api Gateway cannot allow Access-Control-Allow-Origin

孤者浪人 提交于 2020-01-24 13:15:47
问题 This url is in AWS API Gateway with method get and stage is well deployed. And I enabled CORS following the aws document. Here are my steps to enable CORS. -Resource->action->enable CORS-> default setting ->enable CORS and replacing the CORS headers. There is no error log in CORS result. I am not a profesional web developer and my browser is safari. Here is my code to query "http://my.com" function request(idex) { var xmlHttp = new XMLHttpRequest(); xmlHttp.onreadystatechange = function() {