Lessons in this course (9)

3. S3, EBS and EFS

Basic★ Must knowLesson 3 of 9
ServiceTypeUse
S3Object storage (buckets, keys) — 11 nines durabilityUploads, images, static websites, backups, data lake
EBSBlock storage volumes attached to one EC2 instanceOS and database disks
EFS / FSxShared file systems (NFS / Windows SMB with FSx for Windows)Shared content across servers

S3 features: storage classes (Standard, Intelligent-Tiering, Standard-IA, Glacier tiers for archives), lifecycle rules, versioning, pre-signed URLs (temporary upload/download links), server-side encryption (SSE-S3/SSE-KMS, on by default), Block Public Access (keep on unless hosting public content via CloudFront).

csharp
var s3 = new AmazonS3Client();                                   // credentials from the IAM role
await s3.PutObjectAsync(new PutObjectRequest { BucketName = "shop-uploads-prod", Key = $"invoices/{id}.pdf", FilePath = path });
var url = await s3.GetPreSignedURLAsync(new GetPreSignedUrlRequest
{
    BucketName = "shop-uploads-prod", Key = $"invoices/{id}.pdf", Expires = DateTime.UtcNow.AddMinutes(15)
});