xiaohongshu
xiaohongshu
aws-sigv4-req-builder
Generate Python code to call undocumented AWS APIs using SigV4 authentication from cURL requests captured in browser dev tools. This skill should be used when users need to create Python functions that call AWS internal or undocumented APIs with proper AWS Signature Version 4 authentication.
Full skill instructions
Generate Python code to call undocumented AWS APIs using AWS Signature Version 4 authentication from cURL requests.
Use this skill when users need to:
Ask the user for the cURL command (from browser dev tools: Network tab → Right-click → Copy as cURL).
From the cURL command, extract:
us-east-1 from service.us-east-1.amazonaws.com)/us-east-1/q/aws4_request → "q")x-amz-target header (part after the dot, e.g., CreateAssignment from AmazonQDeveloperService.CreateAssignment)CreateAssignment → create_assignment)-X flag or default to POST if --data present--data-raw or --dataCreate a Python function following this pattern:
import boto3
import json
from botocore.awsrequest import AWSRequest
from botocore.auth import SigV4Auth
import requests
def function_name(param1, param2):
"""Call AWS API with description"""
session = boto3.Session()
credentials = session.get_credentials()
payload = {
"key1": param1,
"key2": param2
}
request = AWSRequest(
method="POST",
url="https://service.region.amazonaws.com/",
data=json.dumps(payload),
headers={
"Content-Type": "application/x-amz-json-1.0",
"x-amz-target": "ServiceName.OperationName",
},
)
SigV4Auth(credentials, "service-name", "region").add_auth(request)
response = requests.post(request.url, headers=dict(request.headers), data=request.body)
return response
User provides cURL:
curl 'https://codewhisperer.us-east-1.amazonaws.com/' \
-H 'authorization: AWS4-HMAC-SHA256 Credential=.../us-east-1/q/aws4_request, ...' \
-H 'content-type: application/x-amz-json-1.0' \
-H 'x-amz-target: AmazonQDeveloperService.CreateAssignment' \
--data-raw '{"principalId":"123","principalType":"USER","subscriptionType":"Q_DEVELOPER_STANDALONE_PRO"}'
Auto-extracted:
/us-east-1/q/aws4_request)Generated code:
import boto3
import json
from botocore.awsrequest import AWSRequest
from botocore.auth import SigV4Auth
import requests
def create_assignment(principal_id, principal_type="USER", subscription_type="Q_DEVELOPER_STANDALONE_PRO"):
"""Create Q Developer subscription assignment"""
session = boto3.Session()
credentials = session.get_credentials()
payload = {
"principalId": principal_id,
"principalType": principal_type,
"subscriptionType": subscription_type
}
request = AWSRequest(
method="POST",
url="https://codewhisperer.us-east-1.amazonaws.com/",
data=json.dumps(payload),
headers={
"Content-Type": "application/x-amz-json-1.0",
"x-amz-target": "AmazonQDeveloperService.CreateAssignment",
},
)
SigV4Auth(credentials, "q", "us-east-1").add_auth(request)
response = requests.post(request.url, headers=dict(request.headers), data=request.body)
return response
Generated code requires:
pip install boto3pip install requestsxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience