AWS with Floci

Day 1 — Install & Verify Floci

Chapter 0 — Environment Setup

Day 1 — Install & Verify Floci

1. Concept Primer

Floci is a drop-in LocalStack-compatible AWS emulator: same port (4566), same API shapes, so any tool that speaks the AWS API (CLI, SDKs, Terraform, CDK) works against it unmodified. No account, no auth token, MIT licensed, all 68 services available with no tiering.

2. Hands-on Exercise

Install the CLI, start the emulator, load environment variables, and prove the loop works end-to-end with a real S3 bucket.

3. Exact Commands (from a clean machine)

# Install floci-cli
curl -fsSL https://floci.io/install.sh | sh

# Start the AWS emulator
floci start

# Load AWS_* env vars into your shell (endpoint + dummy creds)
eval $(floci env)

# Sanity check
floci doctor

# Confirm the CLI is actually talking to Floci, not real AWS
aws s3 mb s3://day1-bucket
echo "hello floci" > hello.txt
aws s3 cp hello.txt s3://day1-bucket/
aws s3 ls s3://day1-bucket/
aws s3 cp s3://day1-bucket/hello.txt hello-back.txt
cat hello-back.txt

Docker alternative (if you don't want the native binary):

docker run --rm -p 4566:4566 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  floci/floci:latest

4. Gotchas / Floci vs Real AWS

  • No awslocal wrapper needed — once AWS_ENDPOINT_URL is exported, plain aws works.
  • AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY are dummy values (test/test) — they're required by the SDK/CLI's signing step but not validated by Floci.
  • floci start needs Docker running in the background if you use Lambda/RDS later (those spin up real containers) even though Floci itself is a native binary.
  • Region defaults to us-east-1 unless you export AWS_DEFAULT_REGION — some services are picky about a region being present even if it's not "real."

5. Self-Check

Without looking back at your notes: what two environment variables does floci env set that make the plain aws CLI point at your local emulator instead of real AWS?

Filters

No filters available for this view.

Reset All