मुख्य सामग्री पर जाएँ
Skillpedia
एजेंट35k · #8364

securing-api-gateway-with-aws-waf

यह क्या करती है

यह टूल आपके APIs (आपके ऐप्लिकेशन के संचार गेटवे) को इंटरनेट के आम हमलों और अवांछित ट्रैफ़िक से बचाता है, जैसे घुसपैठ की कोशिशें और ज़रूरत से ज़्यादा रिक्वेस्ट।

कब इस्तेमाल करें

  • ✓जब कोई API लॉन्च करना हो जिसे वेब हमलों से बचाना ज़रूरी हो।
  • ✓एक्सेस की संख्या सीमित करने और ओवरलोड या डिनायल-ऑफ़-सर्विस (DDoS) हमलों को रोकने के लिए।
  • ✓आपके API तक पहुँचने की कोशिश करने वाले खतरनाक बॉट्स की पहचान करके उन्हें ब्लॉक करने के लिए।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/securing-api-gateway-with-aws-waf/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/securing-api-gateway-with-aws-waf/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे API को आम हमलों से बचाओ और एक्सेस को प्रति मिनट 100 तक सीमित करो।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह AWS WAF नाम की एक सुरक्षा ढाल सेट करके काम करता है, जो आपके API तक पहुँचने वाले सारे ट्रैफ़िक की जाँच करती है। यह ढाल पहले से बने नियमों से ज्ञात खतरों को ब्लॉक करती है और अपने बनाए नियमों से ज़रूरत से ज़्यादा या संदिग्ध एक्सेस को सीमित करती है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Securing API Gateway with AWS WAF

When to Use

  • When deploying API Gateway endpoints that require protection against common web attacks
  • When implementing rate limiting and throttling to prevent API abuse and DDoS attacks
  • When building bot detection and mitigation for API endpoints exposed to the internet
  • When compliance requires WAF protection for all public-facing API endpoints
  • When customizing access controls based on IP reputation, geolocation, or request patterns

Do not use for network-level DDoS protection (use AWS Shield), for application logic vulnerabilities (use SAST/DAST tools), or for internal API security between microservices (use service mesh authentication and authorization).

Prerequisites

  • AWS API Gateway (REST or HTTP API) deployed with public endpoints
  • IAM permissions for wafv2:* and apigateway:* operations
  • CloudWatch and S3 or Kinesis Firehose configured for WAF logging
  • Understanding of the API's expected traffic patterns for rate limiting configuration
  • IP reputation lists or threat intelligence feeds for custom IP blocking

Workflow

Step 1: Create a WAF Web ACL with Managed Rule Groups

Create a Web ACL with AWS Managed Rules for baseline protection against OWASP Top 10 attacks.

# Create a WAF Web ACL with managed rule groups
aws wafv2 create-web-acl \
  --name api-gateway-waf \
  --scope REGIONAL \
  --default-action '{"Allow":{}}' \
  --visibility-config '{
    "SampledRequestsEnabled": true,
    "CloudWatchMetricsEnabled": true,
    "MetricName": "api-gateway-waf"
  }' \
  --rules '[
    {
      "Name": "AWSManagedRulesCommonRuleSet",
      "Priority": 1,
      "Statement": {
        "ManagedRuleGroupStatement": {
          "VendorName": "AWS",
          "Name": "AWSManagedRulesCommonRuleSet"
        }
      },
      "OverrideAction": {"None": {}},
      "VisibilityConfig": {
        "SampledRequestsEnabled": true,
        "CloudWatchMetricsEnabled": true,
        "MetricName": "CommonRuleSet"
      }
    },
    {
      "Name": "AWSManagedRulesKnownBadInputsRuleSet",
      "Priority": 2,
      "Statement": {
        "ManagedRuleGroupStatement": {
          "VendorName": "AWS",
          "Name": "AWSManagedRulesKnownBadInputsRuleSet"
        }
      },
      "OverrideAction": {"None": {}},
      "VisibilityConfig": {
        "SampledRequestsEnabled": true,
        "CloudWatchMetricsEnabled": true,
        "MetricName": "KnownBadInputs"
      }
    },
    {
      "Name": "AWSManagedRulesSQLiRuleSet",
      "Priority": 3,
      "Statement": {
        "ManagedRuleGroupStatement": {
          "VendorName": "AWS",
          "Name": "AWSManagedRulesSQLiRuleSet"
        }
      },
      "OverrideAction": {"None": {}},
      "VisibilityConfig": {
        "SampledRequestsEnabled": true,
        "CloudWatchMetricsEnabled": true,
        "MetricName": "SQLiRuleSet"
      }
    },
    {
      "Name": "AWSManagedRulesAmazonIpReputationList",
      "Priority": 4,
      "Statement": {
        "ManagedRuleGroupStatement": {
          "VendorName": "AWS",
          "Name": "AWSManagedRulesAmazonIpReputationList"
        }
      },
      "OverrideAction": {"None": {}},
      "VisibilityConfig": {
        "SampledRequestsEnabled": true,
        "CloudWatchMetricsEnabled": true,
        "MetricName": "IPReputationList"
      }
    }
  ]'

Step 2: Add Rate Limiting Rules

Configure rate-based rules to throttle excessive API requests per IP address.

# Get the Web ACL ARN and lock token
WEB_ACL_ARN=$(aws wafv2 list-web-acls --scope REGIONAL \
  --query "WebACLs[?Name=='api-gateway-waf'].ARN" --output text)

# Update Web ACL to add rate limiting rule
aws wafv2 update-web-acl \
  --name api-gateway-waf \
  --scope REGIONAL \
  --id $(aws wafv2 list-web-acls --scope REGIONAL --query "WebACLs[?Name=='api-gateway-waf'].Id" --output text) \
  --lock-token $(aws wafv2 get-web-acl --name api-gateway-waf --scope REGIONAL --id WEB_ACL_ID --query 'LockToken' --output text) \
  --default-action '{"Allow":{}}' \
  --visibility-config '{
    "SampledRequestsEnabled": true,
    "CloudWatchMetricsEnabled": true,
    "MetricName": "api-gateway-waf"
  }' \
  --rules '[
    {
      "Name": "RateLimitPerIP",
      "Priority": 0,
      "Statement": {
        "RateBasedStatement": {
          "Limit": 2000,
          "AggregateKeyType": "IP"
        }
      },
      "Action": {"Block": {}},
      "VisibilityConfig": {
        "SampledRequestsEnabled": true,

…
अक्सर पूछे जाने वाले सवाल

OWASP Top 10 हमले क्या हैं?

ये वेब ऐप्लिकेशन पर होने वाले सबसे आम और खतरनाक 10 तरह के साइबर हमले हैं, जैसे कोड इंजेक्शन और ऑथेंटिकेशन की खामियाँ।

rate limiting क्या है?

यह एक तरीका है जिससे किसी यूज़र या IP के एक तय समय में भेजे जा सकने वाले रिक्वेस्ट की संख्या नियंत्रित होती है, ताकि ओवरलोड और दुरुपयोग रुके।

bot control क्या है?

यह ऑटोमेटेड प्रोग्राम (बॉट्स) से आने वाले ट्रैफ़िक की पहचान और प्रबंधन करने की क्षमता है। इसमें खतरनाक या अवांछित बॉट्स को ब्लॉक किया जाता है।

जानकारी

लेखक का मूल विवरण

Secures AWS API Gateway endpoints with AWS WAF by configuring managed rule groups for OWASP Top 10 protection, custom rate-limiting rules, bot control, IP reputation filtering, and WAF metric monitoring. Use when deploying API Gateway endpoints that need protection against common web attacks, or when implementing rate limiting and throttling to prevent API abuse and DDoS. '

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

GitHub स्टार
35k
रैंकिंग में स्थान
#8364
लाइसेंस
Apache-2.0
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills