Amazon Web Services Development Skill¶
This skill provides comprehensive guidance for working with Amazon Web Services (AWS), covering project setup, service deployment, infrastructure management, security, and operational best practices.
When to Use This Skill¶
Use this skill when: - Setting up new AWS accounts or organizations - Deploying applications to AWS services (EC2, Lambda, ECS, EKS) - Managing AWS infrastructure with CloudFormation or Terraform - Working with AWS databases (RDS, DynamoDB, Redshift) - Configuring AWS networking, load balancing, and CDN - Implementing security, IAM, and compliance measures - Setting up monitoring, logging, and alerting with CloudWatch - Optimizing costs and managing billing - Troubleshooting AWS service issues or performance problems - Migrating applications to AWS from other platforms
Prerequisites¶
- Active AWS account with billing enabled
- AWS CLI installed and configured (
aws configure) - Appropriate IAM permissions for the tasks
- Basic understanding of cloud computing concepts
- Project-specific requirements (IAM roles, VPC setup)
Instructions¶
1. Account and Environment Setup¶
-
Configure AWS CLI
-
Enable required services and APIs
- Most AWS services don't require explicit enabling
-
Ensure proper IAM permissions are in place
-
Create IAM users, roles, and policies
2. Infrastructure Management¶
-
Use CloudFormation for Infrastructure as Code
-
Follow AWS Resource Naming Conventions
- Use consistent prefixes and suffixes
- Include environment indicators (dev, staging, prod)
- Use hyphens for readability
3. Application Deployment¶
- Choose the Right Compute Service
- Lambda: For serverless functions
- EC2: For virtual machines
- ECS/EKS: For container orchestration
-
Elastic Beanstalk: For managed web applications
-
Deploy to Lambda (Serverless Example)
-
Set Up CI/CD Pipelines
- Use CodePipeline for automated deployments
- Integrate with CodeBuild and CodeDeploy
- Implement blue-green or canary deployments
4. Database and Storage¶
- Select Appropriate Database Service
- RDS: For managed relational databases (MySQL, PostgreSQL, etc.)
- DynamoDB: For NoSQL document database
- Redshift: For data warehousing
-
Aurora: For high-performance relational databases
-
Configure Backups and High Availability
-
Use S3 for Object Storage
5. Security and Networking¶
-
Implement Least Privilege IAM
-
Configure VPC Networks
-
Set Up Load Balancers and CDN
6. Monitoring and Operations¶
-
Enable CloudWatch Monitoring and Logging
aws logs create-log-group --log-group-name my-log-group aws cloudwatch put-metric-alarm --alarm-name my-alarm \ --alarm-description "High CPU usage" \ --metric-name CPUUtilization \ --namespace AWS/EC2 \ --statistic Average \ --period 300 \ --threshold 70 \ --comparison-operator GreaterThanThreshold -
Set Up Alerts and Notifications
- Use CloudWatch Alarms with SNS topics
-
Configure billing alerts
-
Use X-Ray for Application Tracing
- Enable tracing in your applications
- Analyze latency and bottlenecks
Examples¶
Example 1: Deploying a Web Application to Elastic Beanstalk¶
# Create application
aws elasticbeanstalk create-application --application-name my-app
# Create environment
aws elasticbeanstalk create-environment --application-name my-app \
--environment-name my-env \
--solution-stack-name "64bit Amazon Linux 2 v3.4.0 running Node.js 16"
Example 2: Creating a DynamoDB Table and Loading Data¶
# Create table
aws dynamodb create-table --table-name my-table \
--attribute-definitions AttributeName=id,AttributeType=S \
--key-schema AttributeName=id,KeyType=HASH \
--billing-mode PAY_PER_REQUEST
# Put item
aws dynamodb put-item --table-name my-table \
--item '{"id":{"S":"123"},"name":{"S":"John Doe"}}'
Example 3: Setting Up an ECS Cluster¶
# Create cluster
aws ecs create-cluster --cluster-name my-cluster
# Register task definition
aws ecs register-task-definition --cli-input-json file://task-definition.json
# Create service
aws ecs create-service --cluster my-cluster \
--service-name my-service \
--task-definition my-task \
--desired-count 1
Best Practices¶
- Resource Organization: Use resource tags extensively for cost tracking and management
- Security: Implement defense in depth with IAM, Security Groups, and WAF
- Cost Management: Use Cost Explorer, set up budgets, and monitor usage
- Performance: Choose appropriate instance types and use Auto Scaling
- Reliability: Implement Multi-AZ deployments for critical applications
- Automation: Use Infrastructure as Code and CI/CD pipelines
- Compliance: Follow AWS security best practices and compliance standards
Common Issues and Solutions¶
Issue: Access denied errors Solution: Check IAM permissions and ensure proper roles/policies are attached
Issue: Region-specific service availability Solution: Verify service availability in your chosen region
Issue: API rate limiting Solution: Implement exponential backoff and proper error handling
Issue: High costs Solution: Use AWS Cost Explorer, set budgets, and optimize resource usage
Issue: Deployment failures Solution: Check CloudWatch logs and ensure proper IAM permissions
Additional Resources¶
- AWS Documentation
- AWS CLI Reference
- AWS Best Practices
- AWS Pricing Calculator
- AWS Well-Architected Framework
Related Skills¶
terraform-infrastructure: For advanced Infrastructure as Codekubernetes-management: For container orchestrationdatabase-administration: For database-specific taskssecurity-auditing: For security assessments