RousselTMLEARNING

TP · AWS: from discovery to expertise

Lab: S3 storage with LocalStack

What you will learn in this TP
  • Use LocalStack and awslocal
  • Secure a bucket (versioning, encryption, policy)
  • Automate object lifecycle

Introduction #

What you will learn in this section
  • Use LocalStack and awslocal
  • Secure a bucket (versioning, encryption, policy)
  • Automate object lifecycle

Context. Your team wants to store exports and publish static documentation. Before touching the real account, you validate the setup on LocalStack.

Prerequisites: Docker, the AWS CLI and LocalStack (pip install localstack awscli-local terraform-local): everything runs locally, with no AWS account or charges  ·  Estimated time: 45 min

A bucket following best practices and a static site served locally.

Hands-on #

Guided steps, with their solution.

  1. 1. Start LocalStack

    Why? LocalStack exposes all emulated services on port 4566; awslocal is the AWS CLI preconfigured for this endpoint.

    Start LocalStack in the background, check service status and the returned identity.
  2. 2. Create a versioned, encrypted bucket

    Why? Versioning protects against accidental deletions; default encryption applies to every new object.

    Create exports-equipe, enable versioning and default encryption, upload a file twice and list its versions.
  3. 3. Enforce TLS with a bucket policy

    Why? Denying unencrypted requests is a classic security audit control.

    Apply a policy denying any request where aws:SecureTransport is false, then read it back.
  4. 4. Automate the lifecycle

    Why? Moving old exports to a cheaper class reduces the bill without manual work.

    Add a rule: STANDARD_IA at 30 days, DEEP_ARCHIVE at 180 days, delete old versions at 90 days.
  5. 5. Publish a static site and share a temporary link

    Why? S3 serves static sites; a presigned link grants time-limited access without making the bucket public.

    Create the docs-site bucket, enable website hosting, sync a folder and open the site; generate a 15-minute presigned link to the report.

Difficulty level : ●●○○○ (2/5)

My progress

  • ⏱ Estimated time : ≈ 45 min

Sign in to track your progress and take notes. Sign in

💬 Ask a question

Recommended Articles

Superviser et sécuriser AWS : CloudWatch, CloudTrail, Config, KMS et GuardDuty

Exploiter et protéger un environnement AWS : métriques, logs et alarmes CloudWatch, journal des a...

Maîtriser ses coûts AWS : modèles de prix, budgets et optimisation

Comprendre et optimiser la facture AWS : facteurs de coût (calcul, stockage, transfert de données...

Préparer la certification AWS Certified Cloud Practitioner (CLF-C02)

Guide de préparation à l'AWS Certified Cloud Practitioner : format de l'examen, domaines et pondé...

Préparer la certification AWS Certified Solutions Architect – Associate (SAA-C03)

Guide de préparation à l'AWS Solutions Architect Associate : format, quatre domaines (sécurité, r...

Bonnes pratiques AWS : sécurité, fiabilité, coûts et exploitation

Les bonnes pratiques essentielles pour exploiter AWS en production : organisation multi-comptes, ...

Le stockage Google Cloud : Cloud Storage, disques persistants et Filestore

Stocker des données sur Google Cloud : Cloud Storage (classes, emplacements régionaux, birégionau...

Terraform : principes, architecture et flux de travail

Comprendre Terraform : infrastructure as code déclarative, architecture (cœur, fournisseurs, état...

Terraform en CI/CD : pipelines, revue du plan, OIDC et GitOps

Automatiser Terraform : pipeline plan sur demande de fusion et apply après approbation, publicati...

Architecture de la plateforme Datadog : sites, organisations, clés et modèle de données

Comprendre l'architecture de Datadog : sources de données (agent, intégrations cloud, SDK, OpenTe...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!