Skip to content
← DevOps Foundations

Learning bite

Floci and local cloud dependencies

Prepare the local AWS API context used by MicroBank without treating it as real AWS.

  • AWS
Documentation reviewed2026-10-01 · 3 min read
  1. Why
  2. Predict
  3. Try
  4. Inspect
  5. Explain
  6. Save evidence

Predict before you try

Would a successful list prove a deposit reached Ledger?

Try it: Model a cloud API without provisioning its cloud service →
On this page

Model a cloud API without provisioning its cloud service

A stub returns a response supplied by your test. An emulator is a running service that implements selected API behavior and maintains its own state. Floci provides local endpoints for supported AWS APIs. It is useful for application integration, but support varies by service and version. Passing locally does not prove real AWS authorization, quotas, availability, billing, or every API edge case.

MicroBank needs messaging as well as HTTP services. SNS publishes messages to subscribers; SQS holds messages for consumers to receive and acknowledge. In the guided local target, Accounts publishes an event, a topic/subscription sends it to a queue, and Ledger consumes it. Creating a queue alone establishes none of those other connections.

Read the flow before running the emulator

The legacy upstream initializer (read only; bypassed by our Floci profile) creates SNS/SQS resources and an S3 practice bucket. Read infra/localstack/init.sh at the pinned MicroBank revision and list the topic, queue, subscription, policy, and Region it declares. Distinguish the identifier of a resource from the endpoint address used to reach the emulator.

Use this design checklist as a reasoning exercise now:

QuestionWhat to identify in the source
Where does Accounts send requests?Its configured service endpoint and Region
Which event is published?Topic and application message shape
How does the queue receive it?Subscription and permitted send operation
Who reads and acknowledges it?Ledger consumer configuration and behavior
What survives restart?The selected emulator persistence configuration

Complete the Docker module before starting Floci. That module teaches images, ports, networks, Compose, and health checks. This page introduces the dependency model now; the implementation guide provides the actual startup profile later.

Select a version deliberately

The pinned upstream source uses localstack/localstack:3.0 and infra/localstack/init.sh. Those are historical source facts. Our teaching profile replaces that runtime with Floci 2.1.0, pinned by digest in the downloadable starter; Terraform owns resource creation, so the old initializer is not mounted. No LocalStack account or authentication token is used.

Use the starter setup rather than researching a new emulator image for your first run. Record the pinned version and local endpoints. Passing SNS/SQS/S3 checks establishes only those tested operations. On the 16 GB host, stop other deployment tracks before the guided profile. An emulator health endpoint proves less than initialized resources. Initializer logs prove less than a message arriving and being consumed. Each observation answers a different question.

Inspect only the local endpoint when it is ready

After the later guided profile has deliberately started a working emulator on loopback port 24666, use AWS CLI v2 from the Mac:

bash
(
  unset AWS_PROFILE AWS_SESSION_TOKEN AWS_WEB_IDENTITY_TOKEN_FILE AWS_ROLE_ARN
  export AWS_ACCESS_KEY_ID=test
  export AWS_SECRET_ACCESS_KEY=test
  export AWS_EC2_METADATA_DISABLED=true
  aws --endpoint-url=http://127.0.0.1:24666 --region ca-central-1 sns list-topics
  aws --endpoint-url=http://127.0.0.1:24666 --region ca-central-1 sqs list-queues
)

The subshell confines the dummy local credentials to these commands. Both requests explicitly target loopback. ca-central-1 matches the inspected initializer; a different Region can show a different local resource view. These reads do not create anything if initialization is missing.

Compare returned names with the initializer, then inspect the matching subscription and queue attributes through the same endpoint. An empty response may indicate the wrong Region, absent initialization, or genuinely no resources. Diagnose before inventing replacements.

Checkpoint

Would a successful list prove a deposit reached Ledger? No; it verifies resource visibility, not message content or processing. Would local IAM behavior prove a production policy works? No; validate actual AWS policy behavior separately when the cloud track begins.

Keep a short endpoint/version/Region/resource note. Cleanup later uses the named Compose project and its explicit data-retention choice. After foundations, follow MicroBank setup before provisioning its local dependencies.

References: Floci setup↗, SNS support↗, SQS support↗, and MicroBank initializer↗.

Prove what you learned

Inspect the result

Retain account/region or the explicit local/design label, the intended path and a denied or missing check.

Explain it in your own words

Explain why your observation supports the stated outcome, and name one thing it does not prove.

Try a small variation

Change one caller, region or proposed dependency on paper and identify which checks must change.

Your evidence should show

  • Record the context/revision or label the work as a paper or prepared fixture.
  • Compare the prediction with the actual result from “Model a cloud API without provisioning its cloud service”.
  • Retain account/region or the explicit local/design label, the intended path and a denied or missing check.
  • Explain the transfer challenge and retain the same verification question.
Hint

Name the environment enforcing each identity and permission decision.

Answer guide: compare after predicting

No. A successful list proves resource visibility, not message delivery or Ledger processing. Validate real AWS authorization separately.

Compare this with your actual observation. A paper answer is useful reasoning practice; record execution separately.

Recall DNS, routing and effective identity from Systems Foundations. Revisit the previous lesson.

Save the prediction, result and explanation ↓

Your notes and evidence

Record observations, questions, or links to your work. Keep credentials out of your notes.

Loading saved progress…

Back up or restore this path

Progress and notes stay in this browser. A backup contains only this learning path.