Athena を ruby(Rails) から aws-sdk-athena というジェムを使っているのですが
query = 'select * from test_table limit 10' athena_client = Aws::Athena::Client.new response = athena_client.start_query_execution({ query_string: query, result_configuration: { output_location: 's3://aws-athena-query-results/dev/' } })
という感じで output_location にサブフォルダのパスを渡したところ
Aws::Athena::Errors::InvalidRequestException (Unable to verify/create output bucket aws-athena-query-results
といわれます
IAMで一時的にS3全権限を与えてみたのですがダメでした
{ "Effect": "Allow", "Action": [ "s3:*" ], "Resource": [ "*" ] },
output_location をバケット名だけにすれば動くのですが
サブフォルダに分けるのは無理なのでしょうか
ユーザや環境ごとにS3のトップにバケットがちらばるのでできれば1バケットで管理したいのですが…
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。