altrupets/monorepo / skills/cicd/aws
aws
Verified☁️ Skill: AWS Backend Deployment
📋 Metadata
| Atributo | Valor |
|---|---|
| ID | cicd-aws |
| Nivel | 🔴 Avanzado |
| Versión | 1.0.0 |
| Keywords | aws, eks, rds, s3, lambda, cloud |
| Referencia | AWS Docs |
🔑 Keywords para Invocación
awseksrdss3lambda@skill:aws
📖 Descripción
AWS proporciona servicios cloud para backends de Flutter: EKS para containers, RDS para databases, S3 para storage, Lambda para serverless, API Gateway y más.
💻 Servicios Principales para Backend Flutter
1. EKS (Elastic Kubernetes Service)
# Crear cluster con eksctl
eksctl create cluster \
--name myapp-prod \
--version 1.28 \
--region us-east-1 \
--nodegroup-name standard-workers \
--node-type t3.medium \
--nodes 3 \
--nodes-min 2 \
--nodes-max 10 \
--managed
# Configure kubectl
aws eks update-kubeconfig --region us-east-1 --name myapp-prod
2. RDS (Relational Database Service)
# Crear PostgreSQL instance
aws rds create-db-instance \
--db-instance-identifier myapp-db \
--db-instance-class db.t3.micro \
--engine postgres \
--engine-version 15.4 \
--master-username admin \
--master-user-password SecurePassword123! \
--allocated-storage 20 \
--storage-type gp3 \
--storage-encrypted \
--multi-az \
--backup-retention-period 7
3. S3 (Storage)
# Crear bucket
aws s3 mb s3://myapp-storage-prod
# Configurar CORS para Flutter app
aws s3api put-bucket-cors --bucket myapp-storage-prod --cors-configuration '{
"CORSRules": [{
"AllowedOrigins": ["*"],
"AllowedMethods": ["GET", "PUT", "POST"],
"AllowedHeaders": ["*"],
"MaxAgeSeconds": 3000
}]
}'
# Configurar lifecycle policy
aws s3api put-bucket-lifecycle-configuration \
--bucket myapp-storage-prod \
--lifecycle-configuration file://lifecycle.json
4. Lambda + API Gateway (Serverless Backend)
// handler.js
exports.handler = async (event) => {
const body = JSON.parse(event.body);
// Your business logic
const response = {
message: 'Hello from Lambda!',
input: body
};
return {
statusCode: 200,
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
},
body: JSON.stringify(response)
};
};
# Deploy Lambda
zip function.zip handler.js
aws lambda create-function \
--function-name myapp-api \
--runtime nodejs20.x \
--handler handler.handler \
--zip-file fileb://function.zip \
--role arn:aws:iam::123456789012:role/lambda-execution
5. ElastiCache (Redis)
# Crear Redis cluster
aws elasticache create-cache-cluster \
--cache-cluster-id myapp-redis \
--cache-node-type cache.t3.micro \
--engine redis \
--engine-version 7.0 \
--num-cache-nodes 1 \
--cache-subnet-group-name myapp-subnet-group
6. Secrets Manager
# Store database credentials
aws secretsmanager create-secret \
--name prod/database/credentials \
--secret-string '{
"username": "admin",
"password": "SecurePassword123!",
"host": "myapp-db.xxxxx.us-east-1.rds.amazonaws.com",
"port": 5432,
"database": "myapp_prod"
}'
# Retrieve secret
aws secretsmanager get-secret-value \
--secret-id prod/database/credentials \
--query SecretString \
--output text
7. CloudWatch (Monitoring)
# Create log group
aws logs create-log-group --log-group-name /aws/backend/myapp
# Put metric
aws cloudwatch put-metric-data \
--namespace MyApp \
--metric-name RequestCount \
--value 1 \
--dimensions Environment=production
8. IAM Roles for Backend
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject"
],
"Resource": "arn:aws:s3:::myapp-storage-prod/*"
},
{
"Effect": "Allow",
"Action": [
"secretsmanager:GetSecretValue"
],
"Resource": "arn:aws:secretsmanager:*:*:secret:prod/*"
},
{
"Effect": "Allow",
"Action": [
"rds:DescribeDBInstances"
],
"Resource": "*"
}
]
}
9. AWS CDK (Infrastructure as Code)
// lib/backend-stack.ts
import * as cdk from 'aws-cdk-lib';
import * as eks from 'aws-cdk-lib/aws-eks';
import * as rds from 'aws-cdk-lib/aws-rds';
import * as s3 from 'aws-cdk-lib/aws-s3';
export class BackendStack extends cdk.Stack {
constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
super(scope, id, props);
// EKS Cluster
const cluster = new eks.Cluster(this, 'MyAppCluster', {
version: eks.KubernetesVersion.V1_28,
defaultCapacity: 3,
defaultCapacityInstance: cdk.aws_ec2.InstanceType.of(
cdk.aws_ec2.InstanceClass.T3,
cdk.aws_ec2.InstanceSize.MEDIUM
),
});
// RDS Database
const database = new rds.DatabaseInstance(this, 'MyAppDB', {
engine: rds.DatabaseInstanceEngine.postgres({
version: rds.PostgresEngineVersion.VER_15_4,
}),
instanceType: cdk.aws_ec2.InstanceType.of(
cdk.aws_ec2.InstanceClass.T3,
cdk.aws_ec2.InstanceSize.MICRO
),
vpc: cluster.vpc,
multiAz: true,
allocatedStorage: 20,
maxAllocatedStorage: 100,
backupRetention: cdk.Duration.days(7),
});
// S3 Bucket
const bucket = new s3.Bucket(this, 'MyAppStorage', {
versioned: true,
encryption: s3.BucketEncryption.S3_MANAGED,
cors: [{
allowedMethods: [s3.HttpMethods.GET, s3.HttpMethods.PUT],
allowedOrigins: ['*'],
allowedHeaders: ['*'],
}],
});
}
}
🎯 Mejores Prácticas
- Use VPC para aislamiento de red
- Enable encryption en rest y en tránsito
- Tag resources para cost tracking
- Use Secrets Manager para credentials
- Enable CloudWatch logging y monitoring
- Use IAM roles en lugar de access keys
- Enable MFA para usuarios críticos
- Regular backups con RDS automated backups
📚 Recursos
🔗 Skills Relacionados
Versión: 1.0.0 Última actualización: Diciembre 2025
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 117k | Updated | Claude CodeCodex | Verified | Install |