s3 access error in lambda using ruby 2.7

0

Inside my function i have (require "aws-sdk-s3" is called before the function definition):

s3_client = Aws::S3::Client.new(region: 'us-west-2')

s3_object = s3_client.get_object({
bucket: <my bucket arn, copied from the bucket's page on the s3 admin console. It's formatted like: arn:aws:s3:::<bucketname>>,
key: <my object id>,
})

puts s3_object

But I get an error "Only Access Point and Outpost Access Point type ARNs are currently supported.". Why is this happening & how can this be fixed? Thanks!

Edited by: hc4zrr324 on Nov 12, 2020 9:30 AM

質問済み 3年前259ビュー
1回答
0

must use the bucket name not the arn for ruby sdk.

回答済み 3年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ