4.3 - S3 features and programmatic access
AWS Certified Cloud Practitioner covers useful Amazon S3 features and programmatic access. S3 static website hosting lets you serve a simple static website - HTML, CSS and images - directly from a bucket, with no server to manage. A presigned URL gives someone temporary, time-limited access to download (or upload) a single private object without making it public. S3 Event Notifications can automatically trigger an AWS Lambda function or send a message to a queue or topic when an object is created or deleted, enabling event-driven workflows. For programmatic control of AWS, the AWS CLI and AWS SDKs are the options to use instead of the graphical console. Expect scenario questions that describe hosting a static site, granting temporary access to one object, reacting to a bucket event, or interacting with AWS from code, and ask which S3 feature or access method applies.
Serve HTML/CSS/images from a bucket = S3 static website hosting. Temporary link to one private object = presigned URL. Trigger Lambda/queue on object create/delete = S3 Event Notifications. Programmatic access = CLI + SDKs.
Practice questions
1. Which TWO options let you interact with AWS programmatically (not via the graphical console)? (Choose two.)
- AWS Management Console
- AWS Command Line Interface (CLI) (correct answer)
- AWS SDKs (correct answer)
- A monthly PDF invoice
The CLI (commands/scripts) and the SDKs (code in languages like Python or Java) provide programmatic access. The Management Console is the graphical web interface; an invoice is not an access method.
2. Which capability lets you host a simple static website (HTML, CSS, images) directly from an Amazon S3 bucket without any servers?
- S3 static website hosting (correct answer)
- S3 Cross-Region Replication
- S3 Object Lock
- S3 Requester Pays
S3 static website hosting serves static content (no server-side code) directly from a bucket over HTTP. Replication copies objects, Object Lock enforces retention (WORM), and Requester Pays shifts data-transfer costs to the requester.
3. You want to give someone temporary, time-limited access to download a single private S3 object without changing bucket permissions. What do you use?
- A public bucket policy
- Cross-Region Replication
- A presigned URL (correct answer)
- S3 Transfer Acceleration
A presigned URL grants temporary access to a specific object using the creator's permissions and an expiration time, without making the bucket public. Transfer Acceleration speeds uploads; replication and public policies change broader access.
4. Which S3 feature can automatically trigger a Lambda function or send a message to SQS/SNS whenever a new object is uploaded?
- S3 Storage Lens
- S3 Event Notifications (correct answer)
- S3 Requester Pays
- S3 Object Lock
S3 Event Notifications fire on events like object creation and can invoke Lambda or publish to SQS/SNS, enabling event-driven processing. Storage Lens gives analytics, Requester Pays shifts costs, Object Lock enforces retention.
5. Data archived in S3 Glacier Flexible Retrieval can be restored using which set of retrieval speed options?
- Hot, warm, and cold
- Read, write, and list
- Single-AZ and Multi-AZ
- Expedited, Standard, and Bulk (correct answer)
Glacier Flexible Retrieval offers Expedited (fastest, minutes), Standard (hours), and Bulk (cheapest, longest) retrieval tiers, letting you trade speed for cost. Standard S3 classes provide immediate access without retrieval tiers.
6. Where does Amazon EBS store the incremental snapshots you take of a volume for backup?
- In Amazon S3, managed by EBS (correct answer)
- On the local instance store
- In Amazon DynamoDB
- On the EC2 instance's RAM
EBS snapshots are stored durably in Amazon S3 (managed by EBS, not visible in your buckets) and are incremental, saving only changed blocks after the first snapshot. Instance store and RAM are ephemeral.