Manages AWS API Gateway REST APIs: creating APIs and resources, deploying to stages, and invoking endpoints via curl.
Agentic Workflow: Read -> Reason -> Act (aws-apigateway)
You are Aws Apigateway (api/general) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — api context for aws-apigateway
- Domain: Manages AWS API Gateway REST APIs: creating APIs and resources, deploying to stages, and invoking endpoints via curl.
- api-lifecycle: Create REST APIs, resources, methods, and deployments. —
aws apigateway create-rest-api --name my-api
- invoke-and-test: Invoke deployed endpoints and test integration. —
curl -X POST https://abc123xyz.execute-api.us-east-1.amazonaws.com/prod/users -H
- Check
knowledge and prerequisites: aws
2. Reason — think for aws-apigateway
- For
api-lifecycle: Create REST APIs, resources, methods, and deployments. — decide which checks to run
- For
invoke-and-test: Invoke deployed endpoints and test integration. — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with aws-apigateway tools
- Tools:
Glob, Grep, Read, Aws, Bash (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
aws-apigateway:4e18f94a
AWS API Gateway
What this skill does
Manages AWS API Gateway REST APIs: creating APIs and resources, adding methods, deploying to stages, and invoking endpoints via curl and test-invoke-method.
When to use
- Exposing Lambda functions or HTTP backends as managed APIs
- Adding a deployment/stage for a release
- Debugging a 502/500 from an integration
Real commands
# Create an API
aws apigateway create-rest-api --name my-api
# List resources to find the root id
aws apigateway get-resources --rest-api-id abc123xyz
# Deploy to a stage
aws apigateway create-deployment --rest-api-id abc123xyz --stage-name prod
# Invoke from the CLI
aws apigateway test-invoke-method --rest-api-id abc123xyz --resource-id res123 --http-method GET --path-with-query-string '/users'
# Invoke from curl
curl -X POST https://abc123xyz.execute-api.us-east-1.amazonaws.com/prod/users -H "Content-Type: application/json" -d '{"name":"alice"}'
Testing
- Use test-invoke-method to debug before deploying
- Check stage variables and logs after deployment
Best practices
- Deploy to dev/stage/prod stages; never reuse a stage for releases
- Enable access logging and tracing for production stages
- Use usage plans + API keys for client throttling
- Prefer REST API vs HTTP API by feature needs (WAF, custom domains)
Capabilities
api-lifecycle
Create REST APIs, resources, methods, and deployments.
Parameters:
api_name (string): Name of the REST API
stage_name (string): Deployment stage name
region (string): AWS region
Commands:
aws apigateway create-rest-api --name my-api
aws apigateway get-rest-apis
aws apigateway get-resources --rest-api-id abc123xyz
aws apigateway create-deployment --rest-api-id abc123xyz --stage-name prod
aws apigateway get-stages --rest-api-id abc123xyz
Examples:
- aws apigateway create-rest-api --name my-api --endpoint-configuration types=REGIONAL
- aws apigateway create-deployment --rest-api-id abc123xyz --stage-name prod --stage-description "v1.2.0"
- aws apigateway get-rest-apis --query 'items[].{id:id,name:name}' --output table
invoke-and-test
Invoke deployed endpoints and test integration.
Parameters:
api_id (string): REST API ID
resource_id (string): Resource ID for the method
http_method (string): GET/POST/PUT/DELETE
Commands:
curl -X POST https://abc123xyz.execute-api.us-east-1.amazonaws.com/prod/users -H "Content-Type: application/json" -d '{"name":"alice"}'
curl -s https://abc123xyz.execute-api.us-east-1.amazonaws.com/prod/users?limit=10
aws apigateway test-invoke-method --rest-api-id abc123xyz --resource-id res123 --http-method GET --path-with-query-string '/users'
curl -s -o /dev/null -w "%{http_code}\n" https://abc123xyz.execute-api.us-east-1.amazonaws.com/prod/health
Examples:
References
1---2name: "aws-apigateway"3description: "Manages AWS API Gateway REST APIs: creating APIs and resources, deploying to stages, and invoking endpoints via curl. Use when working with api lifecycle, invoke and test or when the user mentions api lifecycle, invoke and test."4license: "MIT"5compatibility: "Requires aws. Needs network access."6metadata:7 source: https://skillmd.com/skills/opknock/aws-apigateway8 author: Kdesk9 version: 2.0.010 category: api11allowed-tools: "Glob Grep Read Bash(aws:*) Bash(curl:*)"12---1314Manages AWS API Gateway REST APIs: creating APIs and resources, deploying to stages, and invoking endpoints via curl.1516## Agentic Workflow: Read -> Reason -> Act (aws-apigateway)1718You are **Aws Apigateway** (api/general) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — api context for `aws-apigateway`21- Domain: Manages AWS API Gateway REST APIs: creating APIs and resources, deploying to stages, and invoking endpoints via curl.22- **api-lifecycle**: Create REST APIs, resources, methods, and deployments. — `aws apigateway create-rest-api --name my-api`23- **invoke-and-test**: Invoke deployed endpoints and test integration. — `curl -X POST https://abc123xyz.execute-api.us-east-1.amazonaws.com/prod/users -H`24- Check `knowledge` and `prerequisites: aws`2526### 2. Reason — think for `aws-apigateway`27- For `api-lifecycle`: Create REST APIs, resources, methods, and deployments. — decide which checks to run28- For `invoke-and-test`: Invoke deployed endpoints and test integration. — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `aws-apigateway` tools32- Tools: `Glob`, `Grep`, `Read`, `Aws`, `Bash` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `aws-apigateway:4e18f94a`3536# AWS API Gateway3738## What this skill does3940Manages AWS API Gateway REST APIs: creating APIs and resources, adding methods, deploying to stages, and invoking endpoints via curl and test-invoke-method.4142## When to use4344- Exposing Lambda functions or HTTP backends as managed APIs45- Adding a deployment/stage for a release46- Debugging a 502/500 from an integration4748## Real commands4950```bash51# Create an API52aws apigateway create-rest-api --name my-api5354# List resources to find the root id55aws apigateway get-resources --rest-api-id abc123xyz5657# Deploy to a stage58aws apigateway create-deployment --rest-api-id abc123xyz --stage-name prod5960# Invoke from the CLI61aws apigateway test-invoke-method --rest-api-id abc123xyz --resource-id res123 --http-method GET --path-with-query-string '/users'6263# Invoke from curl64curl -X POST https://abc123xyz.execute-api.us-east-1.amazonaws.com/prod/users -H "Content-Type: application/json" -d '{"name":"alice"}'65```6667## Testing6869- Use test-invoke-method to debug before deploying70- Check stage variables and logs after deployment7172## Best practices7374- Deploy to dev/stage/prod stages; never reuse a stage for releases75- Enable access logging and tracing for production stages76- Use usage plans + API keys for client throttling77- Prefer REST API vs HTTP API by feature needs (WAF, custom domains)7879## Capabilities8081### api-lifecycle82Create REST APIs, resources, methods, and deployments.8384**Parameters:**85- `api_name` (string): Name of the REST API86- `stage_name` (string): Deployment stage name87- `region` (string): AWS region8889**Commands:**90- `aws apigateway create-rest-api --name my-api`91- `aws apigateway get-rest-apis`92- `aws apigateway get-resources --rest-api-id abc123xyz`93- `aws apigateway create-deployment --rest-api-id abc123xyz --stage-name prod`94- `aws apigateway get-stages --rest-api-id abc123xyz`9596**Examples:**97- aws apigateway create-rest-api --name my-api --endpoint-configuration types=REGIONAL98- aws apigateway create-deployment --rest-api-id abc123xyz --stage-name prod --stage-description "v1.2.0"99- aws apigateway get-rest-apis --query 'items[].{id:id,name:name}' --output table100101### invoke-and-test102Invoke deployed endpoints and test integration.103104**Parameters:**105- `api_id` (string): REST API ID106- `resource_id` (string): Resource ID for the method107- `http_method` (string): GET/POST/PUT/DELETE108109**Commands:**110- `curl -X POST https://abc123xyz.execute-api.us-east-1.amazonaws.com/prod/users -H "Content-Type: application/json" -d '{"name":"alice"}'`111- `curl -s https://abc123xyz.execute-api.us-east-1.amazonaws.com/prod/users?limit=10`112- `aws apigateway test-invoke-method --rest-api-id abc123xyz --resource-id res123 --http-method GET --path-with-query-string '/users'`113- `curl -s -o /dev/null -w "%{http_code}\n" https://abc123xyz.execute-api.us-east-1.amazonaws.com/prod/health`114115**Examples:**116- curl -X POST https://abc123xyz.execute-api.us-east-1.amazonaws.com/prod/users -H "Content-Type: application/json" -d '{"name":"alice"}'117- aws apigateway test-invoke-method --rest-api-id abc123xyz --resource-id res123 --http-method GET --path-with-query-string '/users?limit=5'118- curl -i https://abc123xyz.execute-api.us-east-1.amazonaws.com/prod/users | head -30119120## References121- [API Gateway Developer Guide](https://docs.aws.amazon.com/apigateway/latest/developerguide/)122- [AWS CLI apigateway Reference](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/index.html)123- [API Gateway Best Practices](https://docs.aws.amazon.com/whitepapers/latest/api-gateway-best-practices/)