1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AWS Amplify Mock APIのLocal DynamoDBへのアクセス方法

Last updated at Posted at 2021-09-12

はじめに

AWS Amplify Mock APIで起動しているローカルのDynamoDBにアクセスしたい。
AWS Amplifyを使って開発を行うのであれば、別でDynamoDB localを実行するようなことは避けたい。

2021年9月時点

接続情報

{
  endpoint: "localhost:62224",
  region: "us-fake-1",
  accessKeyId: "fake",
  secretAccessKey: "fake",
}
  • AWS SAMを利用してDocker経由でアクセスする場合
{
  endpoint: "http://host.docker.internal:62224",
  region: "us-fake-1",
  accessKeyId: "fake",
  secretAccessKey: "fake",
}

接続時のTableNameは、「schema.graphql」指定のTable名 + "Table"となります。

コメント

AWS SAMを使用してLambda関数作成時にDynamoDBに接続できなくてはまりました。

参考

https://github.com/aws-amplify/amplify-cli/blob/24d8085325d435284b9c49a43592e61891fd72bc/packages/amplify-dynamodb-simulator/index.js

1
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?