Questions tagged [aws-api-gateway]

1

votes
2

answer
1.1k

Views

Load Testing AWS API Gateway

As the question suggests, I need to perform Load Test on the API Gateway Resources with 1 million RPS. Apache JMeter is a very good tool for Load Testing. But I think it won't be possible to simulate such a huge load from a single machine. In that case, JMeter Clusters could be useful. But setting i...
Tapas Bose
1

votes
4

answer
590

Views

AWS API Gateway Websockets — where is the connectionID?

I am setting up an AWS API Gateway Websockets with a custom authorizer on the $connect route, as described here: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-route-keys-connect-disconnect.html My question is -- how do I get the connectionID, ie the identifier...
Big Endian
1

votes
1

answer
89

Views

Setup a basic WebSocket mock in AWS ApiGateway

I am trying to setup an extremely simple WebSocket mock within AWS ApiGateway. However, every attempt I've tried gives me an error: 13:36:52 (X33uOGUfIAMFq7w=) Extended Request Id: X33uOGUfIAMFq7w= 13:36:52 (X33uOGUfIAMFq7w=) Verifying Usage Plan for request: X33uOGUfIAMFq7w=. API Key: API Stage: re...
lightswitch05
1

votes
1

answer
86

Views

Upload Image into S3 bucket using Api Gateway, Lambda funnction

I'm trying to upload the image (base64) from the postman, I can see when I hit the Serverless API, something has been added in S3 bucket but not image, I'm using nodejs Lambda function, I tried so many solutions but that didn't work out. Please suggest me where I'm wrong: const AWS = require('aws-sd...
Nasreen Ustad
0

votes
0

answer
3

Views

Jquery .post error in Amazon aws-execute serverless app

I am trying to setup this self-destruct-o app I found using the instructions provided on github. I have it on my endpoint (https://n526t325k7.execute-api.us-east-1.amazonaws.com/dev), but there is a 500 error at a $.post call. I have seen some issues with Jquery using API Gateway, but this app doesn...
nick
0

votes
0

answer
9

Views

How to use apigateway for securing Java based REST APIs

I am working on a project build in java that has android frontend. Its basically and android app that calls REST APIs build in java. I have created restful apis using springmvc, hibernate and eclipse. Currently I don't have any security mechanism for these apis (e.g. authentication tokens). I want t...
Zainab Riaz
1

votes
3

answer
233

Views

How can I automate the end-to-end testing of my serverless web app?

So my app stack looks like this in prod: Backend: AWS API Gateway + Lambda + DynamoDB + ElastiCache(redis) Backend - algo: Long running process - dockerized Java app running on ECS (Fargate) Frontend: Angular app, served from S3 I'd like to use https://www.cypress.io/ for end-to-end tes...
Force Hero
1

votes
1

answer
184

Views

AWS GET request with body rejected by CloudFront

I'm build an API using AWS SAM (Lambda & API Gateway) whose contract is defined by a 3rd party. The 3rd party calls my API with a GET request that contains JSON in the body. However, when a request is sent to the API with a body it gets rejected by CloudFront. This is the request: curl -X GET -H 'Co...
Stefan Moser
1

votes
1

answer
334

Views

How to map querystring and header to AWS C# lambda function parameter

I have AWS Gateway REST API that takes 2 querystring parameters https://xxxxxx.xxxx.us-east-1.amazonaws.com/dev/pets?type=dog&page=1 The caller of the API also include x-api-key in the header. I want API gateway to pass querystring parameters and x-api-key to lambda function. So in AWS API Gateway C...
LP13
0

votes
1

answer
69

Views

Service to service workflow with AWS cognito and AWS Lambda

I'm rather new to AWS Cognito and AWS Lambda. So far I've played around with Serverless and deployed my REST API via AWS Lambda. However, I would like to make my API available for several external parties. As this is service to service, there is no end user directly calling my API. I make the API a...
math
1

votes
0

answer
3

Views

Using AWS API Gateway+Lambda Without It becoming a Dependency

There's no doubt to the benefits of API Gatway+Lambda for a micro-services. My concern is what would happen if we decide to move off API Gateway+Lambda to ECS/Fargate, or even another Cloud. There seems to be a consensus on using one Lambda function per route/action. I have some theories about how t...
Sam Hammamy
1

votes
1

answer
358

Views

AWS Amplify React Native, throwing 403 InvalidSignatureException when passing data to request

We create an API for authenticated identities only. so the only valid user can access it. the API is throwing 403 InvalidSignatureException whenever there is data in the body of any request. we also tested the API on native Android. it is working fine with that. our POST request code is the followin...
Nitin Goyal
1

votes
1

answer
606

Views

How do you pass URL Parameters to a Lambda function using AWS API Gateway?

I am currently trying to create a Hello World Lambda function and test it through the API Gateway, as my intent is to provide a REST API using Lambda function. I have a very basic function handler that takes in an integer and outputs it as a string: public string FunctionHandler(int input, ILambdaCo...
bsayegh
1

votes
0

answer
168

Views

Unable to add authorisation in headers to a GET request using axios

Recently, I needed to access the API gateway in AWS using my localhost environment. I am using axios to do a GET request on the API gateway in AWS. The GET request requires an Authorization header in its request. I used the following piece of the code axios({ method: 'GET', url: ROOT_URL+'/users/me'...
shubhamagiwal92
1

votes
1

answer
368

Views

AWS Nested Stacks - Referencing a Parent Stack's Resource

I'm trying to pass resources (ApiGatewayRestApi and a custom authorizer) to a nested stack through stack parameters, however, they continually fail with Embedded stack was not successfully created: The following resource(s) failed to create. Here's my set up in Serverless: Parent Stack { ... 'Neste...
Justin Kruse
1

votes
1

answer
84

Views

Alexa Flash Briefing Skill => not available (maybe timeout?)

I developed a Flash Briefing Skill for Alexa. As URL i entered an URL for AWS API Gateway, which uses my Lambda to create dynamically the JSON Content. My Problem is, that sometimes, i get an error from alexa that my skill is currently not available. If i try it again, it works. after some time, th...
Stefan Volkmer
1

votes
0

answer
357

Views

Make AWS API Gateway with Lambda Invocation return 413 Payload Too Large

I am currently using AWS API Gateway in combination with a lambda invocation. This is working perfectly, as long as I stay withing the known AWS Lambda Limits. One of the calls receives a file via a POST request, so that goes fine as long as the file is < 6 MB. However when the file is too large, I...
Bram Vandewalle
1

votes
0

answer
227

Views

Create http request to upload and get file from s3 base api gateway aws

I have made a method to request API Gateway AWS to PUT and load to upload a binary file to s3. I have created some common methods to create Authorization header like this https://forums.aws.amazon.com/thread.jspa?messageID=819688 my example api link like this: https://xxxxxxxxx.execute-api.ap-north...
BaoBao
1

votes
0

answer
404

Views

OAuth using AWS Lambda and AWS API Gateway

I know AWS has added custom authorizers to support API Gateways (link: https://aws.amazon.com/blogs/compute/introducing-custom-authorizers-in-amazon-api-gateway/), but I have a basic question in the context of enabling OAuth on the APIs. I've so far been unable fo find anything concrete on it. The...
Vinay
1

votes
0

answer
78

Views

Custom domain name for api , domain already exists in the stack

I want to create a custom api for my gateway I'm following this tutorial , https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html I pre createed my certificate and assigned it a domain in my stack myDomainName: Type: AWS::ApiGateway::DomainName Proper...
Shachaf.Gortler
1

votes
0

answer
168

Views

Restrict access to AWS ELB from gateway API only

I want AWS gateway API to be entry point of application cluster. I have 20+ machines running in my VPC which are required for various purposes (RMQ, Worker, etc). I was expecting gateway api to offload the SSL, authenticate request with AWS signature and then forward it to my ELB. And then, some way...
user3819236
1

votes
1

answer
406

Views

How to add cognito user pool authorizer to Lambda Proxy integration in Cloud Formation Template?

I have the following cloud formation JSON template. This template is the default template provided by AWS for C#(Dotnet) Web API Lambda proxy integration. { 'AWSTemplateFormatVersion' : '2010-09-09', 'Transform' : 'AWS::Serverless-2016-10-31', 'Description' : 'An AWS Serverless Application that use...
Deepan Cool
1

votes
1

answer
75

Views

Does AWS Step functions support binary data?

I'm trying to create pipeline by using AWS Step functions for binary data processing. Right now I've done this step-by-step guide from AWS blog about binary support for API Integrations with Amazon API Gateway and it seems works. But when I change Resources > POST > Integration type > AWS Service o...
chinskiy
1

votes
0

answer
81

Views

Configure generated Client certificate from API gateway to spring boot (mutual authentication)

I am trying to configure spring boot two way authentication with the key generated from AWS API gateway (which is .pem format with no private key in it). I tried to convert key from AWS API gateway into .jks format (as spring boot throwing invalid format for .pem), ended up with error 'unable to loa...
Vinni
1

votes
0

answer
721

Views

Send PNG Response through API Gateway + Lambda

I have just read lots of forum messages and some stackoverflow messages. I tried everything. However, I could not send a PNG response through API Gateway. I use LAMBDA_PROXY in API Gateway. In Lambda, I have a code like this: exports.handler = (event, context, callback) => { // some code here ... im...
user9387220
1

votes
0

answer
96

Views

How to integrate AWS Cognito federated identities in a production environment?

I have been trying to integrate a solution for user authentication and authorization in a serverless web application that uses Api gateway and is exposed to customers. Users login through Cognito user pools and obtain temporary AWS access keys through Cognito federated identities, which are then use...
Jesuspc
1

votes
1

answer
887

Views

Why does API Gateway not have permissions for my Authorizer lambda when using Swagger?

I have an API defined using Swagger, which defines the following API Key authorizer: securityDefinitions: api_key: type: apiKey name: x-api-key in: header x-amazon-apigateway-authtype: 'oauth2' x-amazon-apigateway-authorizer: type: token authorizerUri: arn:aws:apigateway:eu-west-1:lambda:path/2015-0...
devrobf
1

votes
4

answer
1.6k

Views

How to use param passing in Lambda / API Gateway

I am trying to build an API using API Gateway, Lambda, and RDS. So you type in the URL and get the specific rows from RDS back in a JSON format. So this is what I would like to achieve. /production/myfootballapi?table=football -> all rows in the table should be returned (not working) /production/...
meck373
1

votes
0

answer
773

Views

Access-Control-Allow-Origin issue when GET from API gateway and lambda

I am using Angular httpclient to issue get to API Gateway, which triggers lambda to get data and return back. From the network diagram, I am seeing the data being returned but I don't receive the data in my handler of the httpclient get, as if an error occured. And I get this error: Failed to load h...
Evan
1

votes
0

answer
38

Views

Caching a specific path despite catchall lambda proxy in API Gateway

On an API gateway stage, I have the resource /{proxy+} defined and for ANY method (GET, POST, etc.) Is it still possible to selectively enable caching, i.e for a single path (“api/path”)? If so, how can it be done?
nnnm
1

votes
0

answer
92

Views

Why am I getting sporadic “role defined for the function cannot be assumed by Lambda” errors in API gateway logs?

We're experiencing sporadic failures when API Gateway is attempting to call an existing Lambda function. Unlike other questions about this error, it is not a new function that I'm having problems getting to work in the first place; this is an existing function that hasn't changed in almost a month,...
Greg
1

votes
1

answer
45

Views

Word document from S3 proxy using AWS API in Angularjs, fails to open “select encoding that makes your document readable”

I am trying to load/save a document from S3 using AWS API (S3 proxy) and angular js. code as below response type is marked as array buffer and is then converted as blob with UTF8 and type as 'application/msword' (verified content type from S3 API) download is successful however the file isn't showin...
Shambhurao Rane
1

votes
0

answer
357

Views

Using multiple Lambda versions with AWS API Gateway

I have two versions of an AWS Lambda function. I wanted to attach it to two stages of API Gateway, dev and prod. I created two aliases, dev and prod, for the two versions of the Lambda function. I created a stage variable called fname and provided the values dev and prod against them in the appropri...
Nikhil Baliga
1

votes
2

answer
752

Views

API Gateway custom domain certificate error

I'm trying to set up a regional API gateway with a custom domain, and I'm hitting a problem involving SSL certificates. Here's what I've done: Using ACM, created a certificate for vitalservices-3.docriot.com. In API Gateway, created a regional custom domain name--vitalservices-3.docriot.com--assigne...
1

votes
2

answer
1.2k

Views

How to get AWS API Gateway invoke URL in an AWS Lambda function?

I'm using the proxy integration with my Java lambda function. The input for the lambda handler is a JSON object that represents an incoming request. It has a body, headers, query params and so on. But it doesn't include the source URL that is parsed by the API Gateway for the body, query params and...
sedovav
1

votes
0

answer
148

Views

AWS API Gateway not able to handle concurrent requests and throwing 504 endpoint timed out errors

I have a node.js application which has just one route exposed. Lets say it is /myResource. It is deployed in AWS ECS Cluster having 5 instances with good compute capacity (I've monitored these and there is no issue here). I have an AWS API gateway to which requests from outside are being made and a...
Rishikesh Dhokare
1

votes
0

answer
282

Views

Serverless API Gateway AWS_IAM Angular 5 signing request

I'm working on an Angular 5 Project that has a Serverless API that requires Authentication using AWS_IAM. So a bit of context. We're using Cognito Federated Identities to issue our temp credentials. Cognito is using our AD FS environment to federate. When I use the temp credentials provided by Cognt...
user1002089
1

votes
0

answer
62

Views

How to hide access key when serving html from was s3?

I have a website that is served from was s3. The website makes an ajax post request to an api gateway, whenever the user fills out the contact form and hits the submit button. For the api I am planning to make restricted with access key. Where should I put the access key, so it is not exposed? Would...
user1305579
1

votes
1

answer
41

Views

How do I map parameters in Lambda?

I'm making a dynamic image resize tool using Lambda, API gateway and Cloudfront. The URL is like this. https://xxx.cloudfront.net/restaurant-101o.png&w=200 But unfortunately, the API returns {'errorMessage':'Error getting object restaurant-101o.png&w=200 from bucket (bucketname). Make sure they exis...
1

votes
1

answer
400

Views

How to access the raw query string (or full URL) in a Chalice (AWS Lambda/API Gateway) app?

I'm using Chalice to build a fairly straightforward API on AWS Lambda & API Gateway. I need a way to get access to the raw query string (i.e foo=bar&abc=123). When accessing the app.current_request.query_params dictionary, it's already been processed, such that any empty parameters (foo=&bar=) have...
robmathers

View additional questions