google-agents-cli-scaffold
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
moai-cloud-aws-advanced
Advanced AWS container and serverless architectures for ECS/EKS orchestration, Lambda patterns, EventBridge workflows, and production deployments. Use when implementing AWS infrastructure, containers, or serverless.
Full skill instructions
Production-grade AWS patterns for containers (ECS/EKS) and serverless (Lambda/EventBridge).
Deploy Lambda Function:
# Create function
aws lambda create-function \
--function-name my-function \
--runtime python3.11 \
--handler lambda_function.lambda_handler \
--role arn:aws:iam::ACCOUNT:role/lambda-role \
--zip-file fileb://function.zip
# Invoke
aws lambda invoke \
--function-name my-function \
--payload '{"key":"value"}' \
response.json
Deploy ECS Service:
# Create cluster
aws ecs create-cluster --cluster-name prod-cluster
# Register task definition
aws ecs register-task-definition --cli-input-json file://task-def.json
# Create service
aws ecs create-service \
--cluster prod-cluster \
--service-name api-service \
--task-definition api:1 \
--desired-count 3 \
--launch-type FARGATE
| Service | Best For | Pricing | Cold Start | Scale Time |
|---|---|---|---|---|
| Lambda | Event-driven, short tasks | Per-request | ~100-500ms | Instant |
| ECS Fargate | Containers, no servers | Per vCPU-hour | None | 1-2 min |
| EKS | Kubernetes, complex apps | EC2 + EKS fee | None | 2-5 min |
| EC2 | Full control, long-running | Per-hour | None | 1-2 min |
Selection Guide:
import json
import os
from aws_lambda_powertools import Logger, Tracer, Metrics
from aws_lambda_powertools.utilities.typing import LambdaContext
logger = Logger()
tracer = Tracer()
metrics = Metrics()
@logger.inject_lambda_context
@tracer.capture_lambda_handler
@metrics.log_metrics(capture_cold_start_metric=True)
def lambda_handler(event: dict, context: LambdaContext) -> dict:
"""
Production Lambda with observability
"""
# Log incoming event
logger.info("Processing request", extra={"event": event})
# Add custom metrics
metrics.add_metric(name="ProcessedItems", unit="Count", value=1)
try:
# Business logic
result = process_event(event)
return {
'statusCode': 200,
'body': json.dumps(result)
}
except Exception as e:
logger.exception("Processing failed")
metrics.add_metric(name="Errors", unit="Count", value=1)
raise
import boto3
from botocore.exceptions import ClientError
def get_secret(secret_name):
"""Get secret from AWS Secrets Manager"""
client = boto3.client('secretsmanager')
try:
response = client.get_secret_value(SecretId=secret_name)
return json.loads(response['SecretString'])
except ClientError as e:
logger.error(f"Failed to get secret: {e}")
raise
# Use in Lambda
DB_PASSWORD = get_secret('prod/db/password')
# Create layer
mkdir python
pip install requests -t python/
zip -r layer.zip python
# Publish layer
aws lambda publish-layer-version \
--layer-name my-dependencies \
--zip-file fileb://layer.zip \
--compatible-runtimes python3.11
# Attach to function
aws lambda update-function-configuration \
--function-name my-function \
--layers arn:aws:lambda:us-east-1:ACCOUNT:layer:my-dependencies:1
{
"family": "api-service",
"networkMode": "awsvpc",
"requiresCompatibilities": ["FARGATE"],
"cpu": "512",
"memory": "1024",
"containerDefinitions": [
{
"name": "api",
"image": "account.dkr.ecr.region.amazonaws.com/api:latest",
"portMappings": [
{
"containerPort": 8000,
"protocol": "tcp"
}
],
"environment": [{ "name": "ENV", "value": "production" }],
"secrets": [
{
"name": "DB_PASSWORD",
"valueFrom": "arn:aws:secretsmanager:region:account:secret:db-password"
}
],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/api-service",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "api"
}
},
"healthCheck": {
"command": [
"CMD-SHELL",
"curl -f http://localhost:8000/health || exit 1"
],
"interval": 30,
"timeout": 5,
"retries": 3
}
}
]
}
# Register scalable target
aws application-autoscaling register-scalable-target \
--service-namespace ecs \
--resource-id service/prod-cluster/api-service \
--scalable-dimension ecs:service:DesiredCount \
--min-capacity 2 \
--max-capacity 10
# Create scaling policy (target tracking)
aws application-autoscaling put-scaling-policy \
--service-namespace ecs \
--resource-id service/prod-cluster/api-service \
--scalable-dimension ecs:service:DesiredCount \
--policy-name cpu-scaling \
--policy-type TargetTrackingScaling \
--target-tracking-scaling-policy-configuration file://scaling-policy.json
scaling-policy.json:
{
"TargetValue": 70.0,
"PredefinedMetricSpecification": {
"PredefinedMetricType": "ECSServiceAverageCPUUtilization"
},
"ScaleOutCooldown": 60,
"ScaleInCooldown": 300
}
# Create cluster with eksctl
eksctl create cluster \
--name prod-cluster \
--region us-east-1 \
--version 1.28 \
--nodegroup-name standard-workers \
--node-type t3.medium \
--nodes 3 \
--nodes-min 2 \
--nodes-max 5 \
--managed
# Configure kubectl
aws eks update-kubeconfig --name prod-cluster --region us-east-1
# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-deployment
spec:
replicas: 3
selector:
matchLabels:
app: api
template:
metadata:
labels:
app: api
spec:
containers:
- name: api
image: account.dkr.ecr.region.amazonaws.com/api:latest
ports:
- containerPort: 8000
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
env:
- name: ENV
value: "production"
---
apiVersion: v1
kind: Service
metadata:
name: api-service
spec:
type: LoadBalancer
selector:
app: api
ports:
- port: 80
targetPort: 8000
kubectl apply -f deployment.yaml
kubectl get services
import boto3
import json
eventbridge = boto3.client('events')
def publish_event(detail_type, detail):
"""Publish event to EventBridge"""
response = eventbridge.put_events(
Entries=[
{
'Source': 'com.myapp.orders',
'DetailType': detail_type,
'Detail': json.dumps(detail),
'EventBusName': 'default'
}
]
)
return response
# Publish order created event
publish_event(
'OrderCreated',
{
'orderId': 'order-123',
'customerId': 'customer-456',
'total': 99.99
}
)
# Create rule
aws events put-rule \
--name order-processing \
--event-pattern '{
"source": ["com.myapp.orders"],
"detail-type": ["OrderCreated"]
}'
# Add target (Lambda)
aws events put-targets \
--rule order-processing \
--targets "Id"="1","Arn"="arn:aws:lambda:region:account:function:process-order"
from aws_cdk import (
Stack,
aws_lambda as lambda_,
aws_apigateway as apigw,
aws_dynamodb as dynamodb,
)
class ApiStack(Stack):
def __init__(self, scope, id, **kwargs):
super().__init__(scope, id, **kwargs)
# DynamoDB table
table = dynamodb.Table(
self, "ItemsTable",
partition_key=dynamodb.Attribute(
name="id",
type=dynamodb.AttributeType.STRING
),
billing_mode=dynamodb.BillingMode.PAY_PER_REQUEST
)
# Lambda function
handler = lambda_.Function(
self, "ApiHandler",
runtime=lambda_.Runtime.PYTHON_3_11,
code=lambda_.Code.from_asset("lambda"),
handler="index.handler",
environment={
"TABLE_NAME": table.table_name
}
)
# Grant permissions
table.grant_read_write_data(handler)
# API Gateway
api = apigw.RestApi(self, "ItemsApi")
items = api.root.add_resource("items")
items.add_method("GET", apigw.LambdaIntegration(handler))
# Query Lambda logs
aws logs insights query \
--log-group-name /aws/lambda/my-function \
--start-time $(date -u -d '1 hour ago' +%s) \
--end-time $(date -u +%s) \
--query-string '
fields @timestamp, @message
| filter @message like /ERROR/
| sort @timestamp desc
| limit 20
'
from aws_xray_sdk.core import xray_recorder
from aws_xray_sdk.core import patch_all
# Patch all supported libraries
patch_all()
@xray_recorder.capture('process_order')
def process_order(order_id):
# Create subsegment
subsegment = xray_recorder.begin_subsegment('validate')
try:
validate_order(order_id)
finally:
xray_recorder.end_subsegment()
# Another subsegment
with xray_recorder.capture('charge_payment'):
charge_payment(order_id)
✅ DO:
❌ DON'T:
* in IAM policiesFor detailed patterns:
Related Skills:
moai-cloud-gcp-advanced: GCP patternsmoai-essentials-perf: Performance optimizationmoai-security-devsecops: DevSecOps practicesServices: Lambda, ECS, EKS, EventBridge, CloudWatch, X-Ray, CDK
Version: 3.0.0
Last Updated: 2025-11-19
Status: Production Ready
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.
Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.
Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.
Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.
Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.
Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.
Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.
Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".
Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.
Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".
Opus.ai: Revolutionize Your Web Experience
Build a no-code AI app in minutes.
An IDE for code migration from legacy to modern frameworks through coding agents.
Automate CGI animation in live-action scenes
Branded artistic QR-code concepts
Launch a website in seconds with AI.
Streamline Your Coding Experience with AI Code Helper
Convert any screenshot or design to clean code.