From python-api
Deploy the portfolio chat agent Lambda function to AWS. Use when the user asks to deploy, redeploy, push to Lambda, update the chat agent, or after updating context files or lambda_function.py. Rebuilds the knowledge base, packages dependencies, and deploys to AWS Lambda.
How this skill is triggered — by the user, by Claude, or both
Slash command
/python-api:deployThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Rebuild and deploy the portfolio chat agent Lambda function to AWS.
Rebuild and deploy the portfolio chat agent Lambda function to AWS.
WebContent/context/lambda/lambda_function.pylambda/knowledge_base.json from context filespackage/ directory and deployment.zippython scripts/build_knowledge_base.py
Verify output shows expected project count and no errors.
cd lambda
rm -rf package/ deployment.zip
pip install -r requirements.txt -t package/ \
--platform manylinux2014_x86_64 \
--only-binary=:all: \
--implementation cp \
--python-version 3.12
The --platform and --only-binary flags ensure compiled extensions are built for Amazon Linux, not macOS.
cp lambda_function.py knowledge_base.json package/
cd package && zip -r ../deployment.zip . && cd ..
aws lambda update-function-code \
--function-name portfolio-chat-agent \
--zip-file fileb://lambda/deployment.zip
Run this from the repository root so the fileb:// path resolves correctly.
Check that the response includes:
"LastUpdateStatus": "InProgress" or "Successful""FunctionName": "portfolio-chat-agent"CodeSha256 value| Setting | Value |
|---|---|
| Function name | portfolio-chat-agent |
| Runtime | python3.12 |
| Region | us-west-1 |
| Memory | 256 MB |
| Timeout | 30 seconds |
| Architecture | x86_64 |
lambda_function.py changed, rebuilding ensures the knowledge base is current.fileb:// path in the deploy command is relative to the working directory.| Problem | Solution |
|---|---|
No module named 'pydantic_core._pydantic_core' | Missing --platform flag during pip install — dependencies were built for macOS instead of Linux |
Unable to load paramfile fileb:// | Wrong working directory — run the deploy command from the repository root |
ResourceNotFoundException | Lambda function doesn't exist yet — create it with aws lambda create-function first |
CodeStorageExceededException | Deployment zip too large — check for unnecessary dependencies in requirements.txt |
npx claudepluginhub cdcoonce/claude-workflow --plugin python-apiProvides AWS Lambda patterns for Python functions using Chalice or raw Python, with cold start optimization and API Gateway/ALB integration for serverless apps.
Builds, tests, migrates, and deploys Amazon Bedrock AgentCore agents with guidance on Memory, Gateway/MCP tools, Identity, Observability, and security policy.
Deploys AgentCore agents to AWS with pre-flight validation, CDK/IAM/quota error diagnosis, version management, rollback, and canary deployments. For deploy failures or preparations.