INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: Containers, ECS and Fargate

Container images and ECR: tags, digests and choosing what runs

A tag names a reference; a digest identifies content. ECR stores and distributes images, while services such as ECS execute them. Learn to identify the intended artifact without assuming a repeated tag means identical content or zero scan findings prove safety.

What you will learn

Separate build, distribution and execution, then align tags, digests, platform support and inspection scope.

Prerequisite

An image packages application files for execution. This exercise uses a fictional registry and content A/B; it does not pull, build, push or run paid scans.

Separate building, storing and executing

Image delivery relationships, not the application HTTP request path
Image delivery relationships, not the application HTTP request path1: Source and inputs — Build an artifact from inputs — Build artifact. 2: Build artifact — Publish approved content — Registry / ECR. 3: Registry / ECR — Retrieve the content to execute — Runtime123Source and inputsBuild artifactRegistry / ECRRuntimeImage delivery relationships, not the application HTTP request path1: Source and inputs — Build an artifact from inputs — Build artifact. 2: Build artifact — Publish approved content — Registry / ECR. 3: Registry / ECR — Retrieve the content to execute — Runtime123Source andinputsBuild artifactRegistry / ECRRuntime
  1. Source and inputs → Build artifactBuild an artifact from inputs
  2. Build artifact → Registry / ECRPublish approved content
  3. Registry / ECR → RuntimeRetrieve the content to execute
Source and inputs
Code, dependencies and build configuration
Build artifact
Build and inspect the image
Registry / ECR
Store and distribute images
Runtime
Retrieve and execute selected content

A registry stores images and related artifacts; a repository is a named store within it. Amazon Elastic Container Registry (ECR) supports private and public repositories, with different access considerations. Storing an image in ECR does not launch or update the application.

Distinguish a repeated tag from identical content

Identify what each reference means
InformationPurposeCaution
Tag, such as report-api:releaseA human-readable name for a version or purpose.With mutable tags, the name can be reassigned to another artifact.
Content digestIdentifies content such as a manifest or index using a hash.Compare the same kind of object; content identity is not safety or authorship.
Local image IDIdentifies local image information.Do not assume it is the registry manifest/index digest.
I1: a mutable tag is reassigned
09:00  registry.example.invalid/report-api:release  -> content A
10:00  registry.example.invalid/report-api:release  -> content B
Task X was started from content A at 09:05
Task Y has not been started

The I1 tag points to different content at the two times. Reassigning it does not rewrite running task X. What a new execution uses also depends on runtime and deployment configuration. ECS has conditional tag-to-digest resolution, so tags do not necessarily make every task use different content.

Align platform and object type when comparing digests

A manifest references image configuration and filesystem layers. A multi-platform index / manifest list references platform-specific manifests. The same index can lead to different Linux/amd64 and Linux/arm64 content.

I2: an index and the selected artifact have different identities
Teaching identifierMeaning
Index MReferences amd64 and arm64 alternatives.
Manifest ALinux/amd64 content referenced by M.
Manifest BLinux/arm64 content referenced by M.

Different digests for M and A do not alone establish tampering. First align index versus platform manifest and OS/CPU selection. Pinning content also does not pin kernel behavior, external configuration, permissions or networking.

Read inspection results with their target, scope and time

Conditions to inspect in ECR scanning
CheckHow to read it
TargetMatch the intended digest, including index/platform distinctions.
ScopeBasic covers OS vulnerabilities; Enhanced integrates with Inspector for OS and language packages.
Time and completionCheck completion and freshness; distinguish unscanned from zero findings.
Remaining judgementZero findings do not prove absence of unknown issues, application defects or unsafe configuration.

A digest supports content comparison. Separately assess trusted provenance, required signatures or build records, embedded secrets, dependency updates and execution tests. Do not bake passwords or tokens into an image or use customer data for this exercise.

  1. Review provenance, build inputs and intended artifact.
  2. Record registry/repository, tag, digest and platform.
  3. Align inspection scope/time and execution tests with that artifact.
  4. Check runtime selection, deployment and recovery.

Practise identifying what is the same

Choose an option to see the result and explanation.

In I1 the release tag name is unchanged at 10:00. What about its content?
Read the answer and reason

Answer: It identifies B here; existing task X does not automatically change · Reassigning a tag and updating an existing execution are separate.

In I2, M and A have different digests. What should you check first?
Read the answer and reason

Answer: Whether you are comparing an index and a platform manifest · They identify different objects; align object type and OS/CPU.

A Basic scan of the intended digest completed with zero findings. What follows?
Read the answer and reason

Answer: It is a time-bounded OS scan result; review other risks separately · Keep target, scope and time; do not equate unscanned content with zero findings.

What is established by storing an image in ECR alone?
Read the answer and reason

Answer: Registry storage; verify execution through the runtime separately · Separate artifact storage from application execution.

Check, then explain in your own words

  1. Separate I1’s tag change from execution X.
  2. Identify I2’s index and platform manifests.
  3. Review inspection scope/time, then study ECS configuration and execution.
Check your understanding: What should you align when identifying an image to execute?

Registry/repository, content digest, target platform, matching inspection results and runtime selection.

A tag alone need not fix content, and different digest objects or scan targets can be confused.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.