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

Comprendre AWS : infrastructure mondiale, comptes, outils et tarification

Les bases indispensables pour démarrer sur Amazon Web Services : régions, zones de disponibilité ...

Le stockage sur AWS : S3, EBS, EFS et sauvegarde

Stocker des données sur AWS : Amazon S3 (buckets, classes de stockage, versionnage, cycle de vie,...

Le calcul sur AWS : EC2, Auto Scaling, Lambda et conteneurs

Choisir et utiliser les services de calcul AWS : instances EC2 (types, AMI, EBS, user data, modèl...

Les bases de données sur AWS : RDS, Aurora, DynamoDB et ElastiCache

Choisir une base de données managée sur AWS : RDS et Aurora pour le relationnel (multi-AZ, réplic...

Infrastructure as Code sur AWS : CloudFormation, CDK, Terraform et Well-Architected

Décrire et déployer son infrastructure AWS en code avec CloudFormation, le CDK ou Terraform, auto...

Terraform sur plusieurs clouds : AWS, Azure, Google Cloud, OVHcloud et Kubernetes

Utiliser Terraform avec les principaux fournisseurs : aws, azurerm, google, ovh et openstack, kub...

Informatique serverless : définition, FaaS et cas d'usage

L'informatique serverless expliquée : Function as a Service (FaaS), fonctionnement, avantages, li...

IAM : identités, rôles et politiques sur AWS

Sécuriser l'accès à AWS avec IAM : utilisateurs, groupes, rôles et politiques JSON, évaluation de...

Le réseau AWS : VPC, sous-réseaux, routage et sécurité

Concevoir un réseau AWS : VPC et plages CIDR, sous-réseaux publics et privés, tables de routage, ...

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!