LoginSignup
0
0

More than 5 years have passed since last update.

Ruby AWS SDK v2でendpoint指定の仕方

Posted at

ローカルにプロキシを立ててAWS SDKの通信を見るとき、HTTPSで暗号化されていると見えないのでHTTPのエンドポイントを指定したい。

こんな感じ。

require "aws-sdk"

options = {region: "ap-northeast-1", endpoint: "http://s3-ap-northeast-1.amazonaws.com"}
bucket = Aws::S3::Resource.new(options).bucket("バケット名")

# アップロード
bucket.object("moge3/sample.txt").upload_file("sample.txt")

Resource.newClient.newと同じオプションを受けつける。

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