LoginSignup
8
4

More than 3 years have passed since last update.

自分用メモ: reg-suit + s3 + cloudfront + lambdaの構成ではaclとcustomDomainをちゃんと設定しよう

Posted at

reg-suit + s3 + cloudfront + lambdaで画像比較の資料全てに認証を必要としたい時のメモ

ドキュメントに書いてあるんだけど、reg-publish-s3-pluginのデフォルトだとaclがpublic-readでputしようとする. ソースコード
この状態でreg-suitを走らせようとすると、ポリシーを先程の構成に最適化したS3だとpublic-readでのputは当たり前なんだけど、拒否される.
この際のaws sdkのエラーメッセージはAccessDeniedになり、設定したregionもnullになる.
このエラーは以下の様に正しくaclとcustomDomainを追加することにより解消される.

regconfig.json
{
  "core": {
    "workingDir": ".reg",
    "actualDir": "__actual_images__",
    "thresholdRate": 0,
    "addIgnore": true,
    "ximgdiff": {
      "invocationType": "client"
    }
  },
  "plugins": {
    "reg-keygen-git-hash-plugin": {
      "expectedType": "base-commit"
    },
    "reg-notify-github-plugin": {
      "prComment": true,
      "prCommentBehavior": "default",
      "clientId": "your_client_id"
    },
    "reg-publish-s3-plugin": {
      "bucketName": "bucket_name",
+     "acl": "private",
+     "customDomain": "your_domain"
    }
  }
}
8
4
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
8
4