Skip to content

Updated instructions for deployment #149

@vikhyat187

Description

@vikhyat187

List of features built

  1. JWT Validation Using RDS Public Key
  • All incoming requests are authenticated using JWTs (JSON Web Tokens).
  • The JWTs are validated against RDS public key
  1. Cross-origin requests are allowed only from trusted domains using this regex:
  • ^https?://([a-zA-Z0-9-]+\.)*realdevsquad\.com$
  1. Lambda Throttling Based on Request Count
  • Lambda functions are automatically throttled when the total number of requests (both successful and failed) exceeds the allowed threshold.
  • This prevents abuse and protects downstream systems from overload.
  1. Reset limit lambda - We can trigger this manually
  • Increase the request limit dynamically.
  • Raise Lambda concurrency from zero to allow traffic again when needed.
  1. Rate limit lambda - This gets trigger automatically when the pendingLimit in RequestLimit table gets less than 1
  • Setting concurrency of all Lambda functions to zero, effectively disabling them.
  • This is useful for enforcing throttling or stopping processing temporarily.
  1. CORS lambda
  • This lambda gets called for all the OPTIONS requests made to the feature flag service
  • This will evaluate the origin header and return the dynamic header in the response headers.
  1. CloudWatch Logging for All Lambda Functions
  • Every Lambda function is configured to push logs to AWS CloudWatch.
  • This provides visibility into function executions, errors, and performance.
  • Image
  1. API Gateway Logging Setup
  • Logs for API Gateway are not enabled by default and must be manually configured:
  • Go to API Gateway → Select Stage → Logs and Tracing
  • Enable Error logs by default
  • Optionally enable INFO logs for debugging when needed.
  1. Authentication for the lambdas
  • All Lambda functions require JWT-based authentication, ensuring secure access.
  1. Rate limiting logic
  • On each API request (OPTIONS / other HTTP methods) we reduce the value of pending limit and once this value becomes less than 1 we make all the lambdas throttle (By setting their concurrency to 0)
  • On this the lambdas return 429 as the response code

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions