Category "aws-api-gateway"

Getting user ID in lambda function (go 1.x) from AWS API Gateway

I updated the API (rest) via the amplify CLI to add a path and function (go 1.x), and within the function, I was able to retrieve the user ID via the following:

API Gateway with EC2 Instance hosted API Integration

I am new to AWS I have hosted my API on EC2 Instance. Imported my API swagger file to Gateway. Now I want to call my EC2 instance API from API gateway how to in

Cloudfront passes request to incorrect origin if AllViewer origin policy is enabled

I created a cloudfront distribution with the below details: Origin1 -> S3Bucket Origin2 -> APIGateway endpoint with base /Prod appended DefaultBehavior -&

CloudFront gives 403 when origin request policy (Include all headers & querystring) is added?

I am trying to set up a CF distribution with custom origin name that points to a custom domain setup in Route53 with latency based routing (to multiple regions)

Accessing the AWS gateway resource in another stack in cdk stack

I have a stack where an api gateway resource is created. I have a construct under this stack from where i need to create a method to the above resource. I tried

CORS Error on sending email using SendGrid, setup on AWS Lambda with API Gateway

I was trying to send email using SendGrid from my front end Vite application but was getting CORS error. I came to know that I need a server to make this code w

AWS API Gateway: Why setting "application/json" mapping template for GET request is required for MOCK integration to work?

I'm setting up a mock integration for GET requests with AWS API Gateway, and wonder why it only works when the application/json request template is specified. T

Cognito User Pool Authorizer defined in openapi without hardcoded values

I have a API Gateway Rest Api resource defined with this template: AWSTemplateFormatVersion: '2010-09-09' Description: "Api gateway" Resources: ApiGateway:

SAM-local fails to start API with multiple stacks

I want to add resources to my root stack and somehow found a function where I can first get stack first like this my_api = RestApi.from_rest_api_attributes(

Correct way to auto create aws api gateways to existing apis

I am building 2 separate nodejs microservices (using express inside each etc). What is the correct way to properly automate creation of AWS Api gateway's so tha

Caching results of a lambda function

We are developing a serverless application. The application has "users" that get added, "groups" that have "permissions" on different "resources". To check if a

AWS API Gateway VPC Link : accessing private HTTP API from AWS API Gateway

I am trying to access to an HTTP API (under private network) from AWS API Gateway. I created VPC link and its available. I am getting error Execution failed due

AWS Lambda function URL returns a different content-length value compared to API Gateway

I have a lambda that loads an S3 file and returns it as a Base64: return { "isBase64Encoded": True, 'statusCode': 200, 'body': b64encode(...).decode

How to deploy API into API Gateway stage using AWS CLI?

I am trying to deploy lambda function into API Gateway using AWS CLI. I am using aws apigateway put-integration and aws apigateway put-integration-response to u

Serverless framework can't connect to existing REST API in AWS

Hello and thanks in advance for the help, Im trying to connect my serverless file to an existing API Rest in AWS but when I make the deploy it fails with the me

AWS CDK - Cognito UserPool authorizer on API Gateway not working

My goal is to set up some lambda functions which are public (i.e. no authorization required to send requests) and other ones which require a User to be logged i

Amplify API REST with AWS_IAM: Request failed with status code 403

I'm trying to execute API calls from ReactNative AWS Amplify to API Gateway endpoint using AWS_IAM authorization. I do it by calling (all Amplify initialization

AWS API Gateway Private API Custom Domain Name

AWS Document says, Custom domain names are not supported for private APIs. Source: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway

AWS HTTP API Gateway integration with SQS - MessageAttribute doesn't work

I've integrated HTTP API Gateway with SQS and have some problem with MessageAttributes. The main goal is to pass parameter in URL, attach it to message attribut

XMLHttpRequest error in flutter web [Enabling CORS AWS API gateway]

Note: It turns out that this had nothing to do with flutter and everything to do with the fact that I had set the API gateway to a Lambda Proxy I am trying to h