mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
* feat(lambdaweb): Lambda Web Functions control plane The lambda-web service model (apiVersion 2025-03-07) signs as lambda, so it is served under the lambda service at /2025-03-07/... with the AWS wire shapes, state words and error wording of the 20 operations on web functions, revisions, endpoints, tags and the resource policy. Revisions and endpoints converge at once. They are stored Active and an endpoint update is stored Successful, while the create and update responses report the transitional state AWS reports, so a CLI waiter settles on its first poll. Code comes from an S3 object that must exist. IamAuth, the resource policy and the endpoint domain are stored but not served yet. Part of #5699 * fix(lambdaweb): carry the page position in the token The nextToken of a list operation was a UUID keyed into an in-memory anchor map that only grew and was not scoped to the account. The token is now a core Pagination cursor that encodes the request (operation, region, account, function, filters and page size) and the cursor of the item the page ended on. A token reused with other parameters gets the AWS "does not match the request" error and any other token the AWS "invalid or has expired" error. AWS issues UUID tokens and rejects any other shape, so Floci no longer reproduces the pattern error for a malformed token. * fix(iam): resolve a Lambda Web revision or endpoint named by its ARN The route resource for IAM enforcement took the path segment after revisions or endpoints as the id. A revision or endpoint ARN in that position carries slashes, so the resource ARN ended in the ARN's first segment and a policy scoped to the revision or endpoint did not apply. The id is now the last segment of such an ARN. * fix(lambdaweb): add the values of a repeated state filter AWS lists a function when any state filter in the request names its state. A later state filter replaced the earlier one, so a request with state=Active followed by state=Failed listed nothing. * fix(lambdaweb): refuse empty arrays in a resource policy AWS answers an empty Action or Resource array with the policy syntax error and an empty principal array with the invalid principal error, which wins when all three are empty. Floci stored such a policy. * fix(lambdaweb): judge a wildcard principal by the operator and value of its condition A trusted condition key alone kept an Allow for every principal out of the public check. AWS blocks the policy unless a positive operator pins the key: StringNotEquals and the IfExists forms do not count, nor does a wildcard in an account value or in the account field of an ARN value, while a wildcard elsewhere in an ARN and a literal * under StringEquals do.
sdk-test-awscli
Compatibility tests for Floci using the AWS CLI v2 (2.22.35).
Tests are plain bash scripts that call aws CLI commands with --endpoint-url pointed at the emulator.
Services Covered
| Group | Description |
|---|---|
ssm |
Parameter Store — put, get, path, tags |
sqs |
Queues, send/receive/delete, attributes |
sns |
Topics, publish, attributes |
s3 |
Buckets, objects, tagging, copy, delete |
dynamodb |
Tables, put/get/update/query/delete items |
iam |
Users, roles, create/get/delete |
sts |
GetCallerIdentity |
ses |
Identities, sending, quotas, notification attributes |
secretsmanager |
Create/get/put/list/tag/delete secrets |
kms |
Keys, aliases, encrypt/decrypt |
cognito |
User pools, clients |
s3-notifications |
S3 → SQS event notifications |
Requirements
- AWS CLI v2
- bash
- jq
- bats-core (installed via
just setup-awscli)
Running
# All groups (from compatibility-tests/)
just test-awscli
# Run bats directly
./lib/run-bats-with-junit.sh sdk-test-awscli/test/ sdk-test-awscli/test-results/junit.xml
Configuration
| Variable | Default | Description |
|---|---|---|
FLOCI_ENDPOINT |
http://localhost:4566 |
Floci emulator endpoint |
AWS credentials are always test / test / us-east-1.
Docker
docker build -t floci-sdk-awscli .
docker run --rm --network host floci-sdk-awscli
# Custom endpoint (macOS/Windows)
docker run --rm -e FLOCI_ENDPOINT=http://host.docker.internal:4566 floci-sdk-awscli