Technologies/LocalStack/localstack.apigateway.request.count
LocalStackLocalStackMetric

localstack.apigateway.request.count

API Gateway request count
Dimensions:None
Available on:Native (1)PrometheusPrometheus (1)
Interface Metrics (2)
Native
Total number of API Gateway requests processed
Dimensions:None
PrometheusPrometheus
Total number of API Gateway requests processed
Dimensions:None

Technical Annotations (50)

Configuration Parameters (6)
regionrecommended: eu-west-1
Required in Terraform provider configuration and AWS CLI commands for LocalStack namespace isolation
LOCALSTACK_DEBUGrecommended: 1
Enable detailed logging to help diagnose silent deployment failures
integration_http_methodrecommended: POST
Required value for Lambda proxy integrations in API Gateway (AWS requirement)
GATEWAY_LISTENrecommended: :4566,:80,:443
Enables LocalStack gateway to listen on ports 80 and 443 for ALB-to-API Gateway integration
PROVIDER_OVERRIDE_APIGATEWAYrecommended: next_gen
Uses next-generation API Gateway provider implementation
APIGW_ENABLE_NEXT_GEN_WEBSOCKETSrecommended: 1
Enables next-gen WebSocket implementation; fix works with or without this setting
Error Signatures (9)
Internal Server Errorerror code
A DynamoDB error occurred. Message sent to queue.log pattern
Internal server errorhttp status
500http status
InternalServerErrorerror code
Error raised during invocation: Internal Server Errorlog pattern
No moto route for service apigateway on path /usageplans/<plan ID>/usage found.error code
502http status
Lambda output should follow the next JSON formatlog pattern
CLI Commands (8)
aws apigateway create-rest-api --name "test-api-cli" --endpoint-url http://localhost:4566 --region eu-west-1diagnostic
curl -v http://local-alb.elb.localhost.localstack.cloud/accounts/healthdiagnostic
curl -v https://50b2495d.execute-api.localhost.localstack.cloud:4566/local/accounts/healthdiagnostic
awslocal apigateway create-deployment --rest-api-id <REST_API_ID> --stage-name devremediation
aws apigatewayv2 update-integration --api-id abcd1234 --integration-id aaabbb --request-parameters 'integration.request.header.someHeaderParam'='route.request.body.someBodyParam'diagnostic
RESOURCE_ID=$(awslocal apigateway get-resources --rest-api-id <api-id> --query "items[?path=='/path'].id" --output text --region <region>)diagnostic
awslocal apigateway get-resource --rest-api-id <api-id> --resource-id $RESOURCE_ID --region <region>diagnostic
sls deploy --stage localremediation
Technical References (27)
API GatewaycomponentSNS topiccomponentSQS queuecomponentaws_api_gateway_rest_apicomponentLOCALSTACK_DEBUGcomponentaws_api_gateway_integrationcomponentLambda ProxyconceptIAM permissionsconceptenvironment variablesconfigurationAPIGW v2 HTTP Endpointcomponentlocalhost.localstack.cloudcomponentTwistedWebcomponentGetUsagecomponentmotocomponentusage plansconceptCreateDeploymentcomponentREST APIscomponentHTTP APIscomponentAWS_PROXYcomponentl.s.apigateway.integrationcomponentAPI Gateway WebSocketcomponentroute.request.bodyconceptintegration.request.headerconceptrequest-parameterscomponentCloudFormationcomponentserverless-localstackcomponentCORSconcept
Related Insights (10)
API Gateway internal server error during database outagecritical
LocalStack resources fail to deploy without explicit region specification for namespace isolationwarning
API Gateway accepts invalid GET method for Lambda proxy integrationwarning
500 Internal Server Error prevents request fulfillment due to server-side failurescritical
API Gateway returns 500 when proxying to ALB on port 80critical
Missing API Gateway GetUsage endpoint prevents local testingwarning
API Gateway endpoint unreachable without deploymentcritical
API Gateway returns 502 when Lambda proxy response format is invalidwarning
API Gateway WebSocket body parameters not mapped to integration headerswarning
API Gateway CORS OPTIONS methods missing after stack redeploymentwarning