* docs(skill): publish the floci agent skill for the CLI and the four emulators skills/floci/ teaches an AI agent to run, wire up and troubleshoot the AWS, GCP, Azure and OCI emulators through floci-cli, docker run or Docker Compose. - SKILL.md with the lifecycle, the hard rules (fake credentials only, verify the endpoint, name the tree, parse -o json) and one reference per cloud. - references/docs.md sends the agent to the published documentation of each emulator instead of copying coverage lists that go stale. - references/docker.md and assets/compose/ give docker run equivalents of 'floci <tree> start' and a ready Compose template per cloud, plus one with all four on a network. - scripts/install-floci.sh and scripts/ensure-running.sh. - .claude-plugin/marketplace.json publishes it as a Claude Code plugin and the root plugin.json as a Kiro power (Agent Plugins format). - SkillDocsTest checks every floci command and flag the skill quotes against the real command tree, its links, its frontmatter and both manifests. - README: an "AI agents" section with the install commands, a Privacy section on what the CLI and the skill send over the network, and support links. - AGENTS.md: a command, flag, env output or exit code change updates the skill in the same change. Signed-off-by: Hector Ventura <hectorvent@gmail.com> * docs(skill): bind published ports to loopback and make the helper fail safely Addresses the review of #69. - The Compose templates and the docker run examples publish the emulator on 127.0.0.1. The emulators accept fake credentials, so a plain 4566:4566 exposed local resources to the network. docker.md says when to drop it and that 'floci <tree> start' still publishes on every interface. - ensure-running.sh no longer replaces a stopped container: it exits 3 and leaves it alone unless FLOCI_REPLACE_STOPPED=1, because start removes the container and, without a profile, its settings. - The documented call is now 'exports="$(...)" && eval "$exports"'. The one-step eval succeeded when the helper failed, so later commands ran with missing or stale wiring. - The templates say that container name, namespace and network name are per project and change together. - docker.md lists the network settings to copy into the multi-cloud file when an app reaches child containers by name. - ci.md installs into a user-writable directory instead of assuming /usr/local/bin or sudo. - SkillDocsTest now reads commands inside assignments and across continued lines, with a test that a wrong flag is found in each form. The helper's own status and env calls were not being checked. Signed-off-by: Hector Ventura <hectorvent@gmail.com> --------- Signed-off-by: Hector Ventura <hectorvent@gmail.com>
5.0 KiB
AWS (floci)
Port 4566, container floci, tree floci aws, image floci/floci.
Wiring
eval "$(floci aws env -o text)" exports:
| Variable | Value |
|---|---|
AWS_ENDPOINT_URL |
http://localhost.floci.io:4566 |
AWS_ACCESS_KEY_ID |
test |
AWS_SECRET_ACCESS_KEY |
test |
AWS_DEFAULT_REGION |
us-east-1 |
Options: --region eu-west-1, --host <name>, --shell fish|powershell, -o json,
--profile <name>. localhost.floci.io resolves to 127.0.0.1 and makes virtual-hosted S3
bucket URLs work. The region default is taken from an AWS_DEFAULT_REGION already set in the
shell, and the host from FLOCI_HOST; pass the flags when the value matters.
Modern AWS CLI v2 and SDKs honor AWS_ENDPOINT_URL for every service. After eval, plain
aws works.
Leaks to public AWS
- Some SDKs and older botocore versions skip
AWS_ENDPOINT_URLfor specific services (SQS is the known case). When in doubt, pass--endpoint-url "$AWS_ENDPOINT_URL"explicitly. Theawslocalwrapper from the floci repo always passes an endpoint, but it readsFLOCI_ENDPOINT(defaulthttp://localhost:4566), notAWS_ENDPOINT_URL: on a custom port or profile, setFLOCI_ENDPOINT="$AWS_ENDPOINT_URL"first. - S3 with a host other than
localhost.floci.io(a Compose service name, an IP) needs path-style addressing, set in code:forcePathStyle: true(JS v3),forcePathStyle(true)(Java v2),config=Config(s3={"addressing_style": "path"})(boto3). - A named profile in
~/.aws/configwith its ownendpoint_urlor credentials can override the env vars. Do not pass--profiletoawsunless it is a Floci profile. - In code, set the endpoint on the client builder when the SDK version predates
AWS_ENDPOINT_URLsupport (Java v2endpointOverride, boto3endpoint_url, JS v3endpoint), and set S3forcePathStyleif you do not uselocalhost.floci.io.
Accounts and regions
- Default account id
000000000000(FLOCI_DEFAULT_ACCOUNT_ID). - A 12-digit access key id is used as the account id, so
AWS_ACCESS_KEY_ID=111111111111gives an isolated account. Same convention as LocalStack. - Signatures are not verified by default (
FLOCI_AUTH_VALIDATE_SIGNATURES=false).
Starting options
floci aws start --persist ./data # keep state across recreation
floci aws start --port 4567 # custom host port; base URL is adjusted
floci aws start --namespace team-b # scope child containers (see namespaces.md)
floci aws start --pull always # newest image
Every service is on by default and starts instantly, so there is nothing to select. Do not use
start --services: no emulator reads the list it passes. To switch a service off, set
FLOCI_SERVICES_<NAME>_ENABLED=false on the container (Compose or docker run, see
docker.md).
Snapshots: the floci aws snapshot commands exist, but the emulator has no snapshot API
yet, so they fail with exit 1. Use --persist to keep state.
Coverage
More than 120 services are documented, one page each. Do not rely on a list from memory:
floci aws services -o jsonshows what is enabled in the running instance.- Read the service page before coding against it:
https://floci.io/floci/services/<slug>/(find the slug inhttps://floci.io/floci/sitemap.xml; see docs.md).
Services come in three kinds, and the page says which one applies:
- Real containers (need the Docker socket), e.g. Lambda, ECS, EC2, RDS, ElastiCache, OpenSearch, MSK. Several have a mock mode for when no Docker is available.
- In-process, full behavior, e.g. S3, DynamoDB, SQS, SNS, IAM, STS, KMS, Secrets Manager, SSM, EventBridge, Step Functions, Kinesis, CloudFormation, API Gateway, Cognito.
- Canned or proxied responses, e.g. Bedrock Runtime, Textract, Transcribe, Comprehend, Rekognition, Translate. Fine for wiring and control-plane tests, not for checking real output.
Docs: https://floci.io/floci/ (configuration, ports, storage, TLS, init hooks, Terraform, migration from LocalStack).
Recipes
# S3
aws s3 mb s3://my-bucket && echo hi | aws s3 cp - s3://my-bucket/hi.txt
# DynamoDB
aws dynamodb create-table --table-name users \
--attribute-definitions AttributeName=id,AttributeType=S \
--key-schema AttributeName=id,KeyType=HASH --billing-mode PAY_PER_REQUEST
# SQS: use the returned QueueUrl as-is
aws sqs create-queue --queue-name jobs --query QueueUrl --output text
# Lambda (needs Docker): zip, create, invoke
aws lambda create-function --function-name hello --runtime python3.12 \
--handler app.handler --zip-file fileb://fn.zip --role arn:aws:iam::000000000000:role/lambda
aws lambda invoke --function-name hello out.json && cat out.json
Containers reaching floci
Other containers on the same Compose network should use the service name, and the emulator
should advertise it: set FLOCI_HOSTNAME=floci so returned URLs (SQS QueueUrl, presigned
URLs) use http://floci:4566. See docker.md and assets/compose/aws.yml.