# aws > Core AWS services guidance including EC2, S3, RDS, and Lambda for cloud infrastructure. - Author: PHAN ANH TUAN - Repository: TUAN130294/Universalkit - Version: 20251220090240 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/TUAN130294/Universalkit - Web: https://mule.run/skillshub/@@TUAN130294/Universalkit~aws:20251220090240 --- # AWS Cloud Platform Core AWS services guidance including EC2, S3, RDS, and Lambda for cloud infrastructure. ## Skill Overview This skill covers fundamental AWS services for hosting applications, storing data, and running serverless functions. ## Core Services ### EC2 (Elastic Compute Cloud) **Launch Instance:** ```bash # Create instance aws ec2 run-instances \ --image-id ami-0c55b159cbfafe1f0 \ --instance-type t2.micro \ --key-name my-key-pair \ --security-group-ids sg-903004f8 \ --subnet-id subnet-6e7f829e # List instances aws ec2 describe-instances # Start/stop instance aws ec2 start-instances --instance-ids i-1234567890abcdef0 aws ec2 stop-instances --instance-ids i-1234567890abcdef0 # Terminate instance aws ec2 terminate-instances --instance-ids i-1234567890abcdef0 ``` ### S3 (Simple Storage Service) **Bucket Operations:** ```bash # Create bucket aws s3 mb s3://my-bucket-name # List buckets aws s3 ls # Upload file aws s3 cp file.txt s3://my-bucket-name/ aws s3 cp ./dist s3://my-bucket-name/ --recursive # Download file aws s3 cp s3://my-bucket-name/file.txt ./ # Sync directory aws s3 sync ./dist s3://my-bucket-name/ # Delete object aws s3 rm s3://my-bucket-name/file.txt # Make bucket public (static website) aws s3 website s3://my-bucket-name/ --index-document index.html ``` ### RDS (Relational Database Service) **Database Management:** ```bash # Create DB instance aws rds create-db-instance \ --db-instance-identifier mydb \ --db-instance-class db.t3.micro \ --engine postgres \ --master-username admin \ --master-user-password password \ --allocated-storage 20 # List DB instances aws rds describe-db-instances # Create snapshot aws rds create-db-snapshot \ --db-instance-identifier mydb \ --db-snapshot-identifier mydb-snapshot-$(date +%Y%m%d) # Restore from snapshot aws rds restore-db-instance-from-db-snapshot \ --db-instance-identifier mydb-restored \ --db-snapshot-identifier mydb-snapshot-20240101 ``` ### Lambda (Serverless Functions) **Function Creation:** ```bash # Create function aws lambda create-function \ --function-name my-function \ --runtime nodejs18.x \ --role arn:aws:iam::123456789012:role/lambda-role \ --handler index.handler \ --zip-file fileb://function.zip # Invoke function aws lambda invoke \ --function-name my-function \ --payload '{"key":"value"}' \ response.json # Update function code aws lambda update-function-code \ --function-name my-function \ --zip-file fileb://function.zip # List functions aws lambda list-functions ``` **Lambda Function Example:** ```javascript // index.js exports.handler = async (event) => { console.log('Event:', JSON.stringify(event)); const response = { statusCode: 200, body: JSON.stringify({ message: 'Hello from Lambda!', input: event }) }; return response; }; ``` ## IAM (Identity and Access Management) ```bash # Create user aws iam create-user --user-name developer # Attach policy aws iam attach-user-policy \ --user-name developer \ --policy-arn arn:aws:iam::aws:policy/AmazonS3FullAccess # Create access key aws iam create-access-key --user-name developer ``` ## CloudWatch (Monitoring) ```bash # Get metrics aws cloudwatch get-metric-statistics \ --namespace AWS/EC2 \ --metric-name CPUUtilization \ --dimensions Name=InstanceId,Value=i-1234567890abcdef0 \ --start-time 2024-01-01T00:00:00Z \ --end-time 2024-01-01T23:59:59Z \ --period 3600 \ --statistics Average # View logs aws logs tail /aws/lambda/my-function --follow ``` ## Resources - [AWS Documentation](https://docs.aws.amazon.com/) - [AWS CLI Reference](https://awscli.amazonaws.com/v2/documentation/api/latest/index.html) - [AWS Free Tier](https://aws.amazon.com/free/) ## Related Skills - `cloud/vercel` - Vercel deployment - `cloud/netlify` - Netlify hosting - `cloud/railway` - Railway platform