aws-api-gateway

API Gateway GET / PUT large files into S3

戏子无情 提交于 2020-08-04 05:19:20
问题 Following this AWS documentation, I was able to create a new endpoint on my API Gateway that is able to manipulate files on an S3 repository. The problem I'm having is the file size (AWS having a payload limitation of 10MB). I was wondering, without using a lambda work-around (this link would help with that), would it be possible to upload and get files bigger than 10MB (even as binary if needed) seeing as this is using an S3 service as a proxy - or is the limit regardless? I've tried PUT

{“message”:“Missing Authentication Token”} while accessing lambda through API end point

心已入冬 提交于 2020-07-31 04:21:11
问题 I am able to call the URL end point through POSTMAN which is invoking a lambda function. But when i am trying to use the end point through browser it is giving me bow json object. i feel API gateway is blocking it. I dont have any authorization set for the end point as you can see below {"message":"Missing Authentication Token"} I have this above setting. wondering what is causing this? i have similar lambda integration is "/call" resource which has GET method which is working fine both in

How to fetch the data from elastic Search index to api on hit through lambda function?

老子叫甜甜 提交于 2020-07-28 04:57:18
问题 I have created an elastic search domain. Push the document into elastic search with index my-index through lambda function https://search-xx.us-east-1.es.amazonaws.com/my-index/_search What I have done. I have created an api (post) What need to do? How to fetch the data from elastic Search index to api on hit through lambda function? My return is null COde to generate elastic search import boto3 import json from requests_aws4auth import AWS4Auth from elasticsearch import Elasticsearch,

Is there a way to assign a Static IP to a AWS Lambda without VPC?

怎甘沉沦 提交于 2020-07-17 11:55:52
问题 I am looking to assign a static IP to my Lambda which is being invoked via the API gateway. This is required because, the downstream system that i invoke from this lambda accepts web requests only from a Whitelisted IP. I am successful in achieving this via the VPC that i associate with my lambda. But VPC introduces a bad cold-start time which sometime ranges 12-16seconds. So i am looking for a way to prevent this cold start from the VPC, but at the same time assign a static IP to the lambda.

Amazon API gateway timeout

妖精的绣舞 提交于 2020-07-17 06:05:49
问题 I have some issue with API gateway. I made a few API methods, sometimes they work longer then 10 seconds and Amazon returns 504 error. Here is screenshot below: Please help! How can I increase timeout? Thanks! 回答1: Right now the default limit for Lambda invocation or HTTP integration is 30s according to http://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html and this limit is not configurable. 回答2: As of Dec/2017, the maximum value is still 29 seconds, but should be able to

Amazon API gateway timeout

拥有回忆 提交于 2020-07-17 06:03:23
问题 I have some issue with API gateway. I made a few API methods, sometimes they work longer then 10 seconds and Amazon returns 504 error. Here is screenshot below: Please help! How can I increase timeout? Thanks! 回答1: Right now the default limit for Lambda invocation or HTTP integration is 30s according to http://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html and this limit is not configurable. 回答2: As of Dec/2017, the maximum value is still 29 seconds, but should be able to

Custom authorizer context variable in API Gateway HTTP integration URL

隐身守侯 提交于 2020-07-11 06:36:34
问题 I would like to use an API Gateway HTTP integration towards an endpoint, where certain parts of the URL are provided by the custom authorizer (e.g., user ID or user grants). I could definitely use a Lambda integration but that introduces quite significant response time overhead. Unfortunately syntax that works for stageVariables does not seem to work for custom authorizer context - ${context.authorizer.variableName} . Note: To answer some comments, yes, the warning sign is there bacause I

Is there a way to turn on SageMaker model endpoints only when I am receiving inference requests

左心房为你撑大大i 提交于 2020-07-10 10:25:50
问题 I have created a model endpoint which is InService and deployed on an ml.m4.xlarge instance. I am also using API Gateway to create a RESTful API. Questions: Is it possible to have my model endpoint only Inservice (or on standby) when I receive inference requests? Maybe by writing a lambda function or something that turns off the endpoint (so that it does not keep accumulating the per hour charges) If q1 is possible, would this have some weird latency issues on the end users? Because it

Access Denied Error when trying to post messages to SQS

▼魔方 西西 提交于 2020-07-07 23:21:58
问题 I am trying to create an API that logs JSON request bodies in an SQS queue. I have set up a basic queue in SQS in both the FIFO and non-FIFO layouts. I have the same problem each time. My policy for the SQS queue is as follows: { "Version": "2012-10-17", "Id": "arn:aws:sqs:us-east-1:2222222222222:API-toSQS.fifo/SQSDefaultPolicy", "Statement": [ { "Sid": "Sid22222222222", "Effect": "Allow", "Principal": "*", "Action": "SQS:*", "Resource": "arn:aws:sqs:us-east-1:2222222222222:API-toSQS.fifo" }

Access Denied Error when trying to post messages to SQS

陌路散爱 提交于 2020-07-07 23:14:52
问题 I am trying to create an API that logs JSON request bodies in an SQS queue. I have set up a basic queue in SQS in both the FIFO and non-FIFO layouts. I have the same problem each time. My policy for the SQS queue is as follows: { "Version": "2012-10-17", "Id": "arn:aws:sqs:us-east-1:2222222222222:API-toSQS.fifo/SQSDefaultPolicy", "Statement": [ { "Sid": "Sid22222222222", "Effect": "Allow", "Principal": "*", "Action": "SQS:*", "Resource": "arn:aws:sqs:us-east-1:2222222222222:API-toSQS.fifo" }