Skip to main content

API Cost Savings

API Gateway:

  • HTTP APIs instead of REST APIs for simple use cases, as they have a lower cost per request.
  • Use API Gateway caching reduces the number of requests to the backend services and save on data transfer costs.
  • Utilize the built-in API Gateway request and response validation to prevent unnecessary requests from being processed, reducing overall API Gateway costs.
  • Consider using a regional endpoint instead of a global endpoint if API usage is primarily regional, as regional endpoints have lower costs.
  • Implement usage plans and API keys to manage and control access to APIs and track usage, allowing optimized resource allocation and avoid overages.

AppSync:

  • Optimize AppSync data source usage by minimizing the number of data source calls and utilizing caching to reduce data transfer costs.
  • Consider using Lambda resolvers for serverless and cost-efficient data processing, as they have a lower cost per request and can scale automatically.
  • Use AppSync's built-in subscription resolvers instead of implementing custom logic, as they are optimized for efficient data transfer and can reduce data transfer costs.
  • Implement usage quotas and limits to track and manage API usage, allowing better resource allocation and avoid overages.
  • Use cost allocation tags to track and optimize AppSync costs, enabling you to identify the specific resources and operations that are driving costs and optimize accordingly.