LoginSignup
0
0

More than 5 years have passed since last update.

LocalStackでユニットテスト

Posted at

LocalStackは、AWSのサービス(と同じインターフェイス)をローカルに構築します。
Macで実行する場合、Docker for MacのFile Sharingで一手間かかかるので、pipインストールをお勧めします。

環境

LocalStack用プロファイルの作成

$ aws configure --profile localstack
AWS Access Key ID [None]: dummy
AWS Secret Access Key [None]: dummy
Default region name [None]: us-west-2
Default output format [None]: 

$ cat ~/.aws/credentials
[localstack]
aws_access_key_id = dummy
aws_secret_access_key = dummy

$ cat ~/.aws/config
[default]
[profile localstack]
region = us-west-2

pipでLocalStackをインストール

$ pip install localstack
$ localstack start
Starting local dev environment. CTRL-C to quit.
Starting mock ES service (http port 4578)...
Starting local Elasticsearch (http port 4571)...
〜
2018-06-05T11:11:02:WARNING:infra.py: Service "elasticsearch" not yet available, retrying...
Ready.

『Ready』になれば、準備完了。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0