← 返回命令列表

Linux command

fakecloud 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start the emulator

fakecloud

Install fakecloud

curl -fsSL https://raw.githubusercontent.com/faiscadev/fakecloud/main/install.sh | bash

Enable SigV4 signature verification

fakecloud --verify-sigv4

Enable strict IAM policy enforcement

fakecloud --iam [strict]

Create an SQS queue

aws --endpoint-url http://localhost:4566 sqs create-queue --queue-name [my-queue]

Install with Cargo

cargo install fakecloud

Run inside Docker

docker run -p 4566:4566 faisca/fakecloud

说明

fakecloud is a single self-contained binary (~19 MB, ~10 MiB RSS, ~500 ms startup) that emulates the most common AWS services locally — S3, SQS, SNS, DynamoDB, Lambda, IAM, and more — so that integration tests do not need cloud credentials or internet access. Point any AWS SDK or the aws CLI at _http://localhost:4566_ with dummy credentials (access_key=test, secret_key=test) and it responds with the same wire protocol as the real service. First-party test SDKs exist for TypeScript, Python, Go, PHP, Java, and Rust. fakecloud itself has no runtime dependency on Docker, though a container image is provided for CI convenience.

参数

--verify-sigv4
Enable cryptographic signature verification so that clients must sign requests exactly as they would for real AWS.
--iam _MODE_
IAM policy enforcement. _soft_ evaluates but does not block; _strict_ denies unauthorized calls. Defaults to off.
--port _PORT_
Listen on an alternate TCP port (default _4566_).
--host _ADDR_
Bind to a specific interface (default _127.0.0.1_).
--data-dir _DIR_
Directory used to persist emulated state between runs.
-h, --help
Show help and exit.
-V, --version
Print version and exit.

FAQ

What is the fakecloud command used for?

fakecloud is a single self-contained binary (~19 MB, ~10 MiB RSS, ~500 ms startup) that emulates the most common AWS services locally — S3, SQS, SNS, DynamoDB, Lambda, IAM, and more — so that integration tests do not need cloud credentials or internet access. Point any AWS SDK or the aws CLI at _http://localhost:4566_ with dummy credentials (access_key=test, secret_key=test) and it responds with the same wire protocol as the real service. First-party test SDKs exist for TypeScript, Python, Go, PHP, Java, and Rust. fakecloud itself has no runtime dependency on Docker, though a container image is provided for CI convenience.

How do I run a basic fakecloud example?

Run `fakecloud` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --verify-sigv4 do in fakecloud?

Enable cryptographic signature verification so that clients must sign requests exactly as they would for real AWS.