Hi guys, Im trying to start a transcription job using the ruby aws-transcribe sdk, but Im getting the following permissions error when trying to access the audio file in the S3 bucket:
Aws::TranscribeService::Errors::BadRequestException: The S3 URI that you provided can't be accessed. Make sure that you have read permission and try your request again.
Im using an IAM role that has full S3 access and full Transcribe access ... so I don't understand what the problem might be (I even tried using a pre-signed url to test reading permissions and was able to download the audio file without issues, but still got the same permissions error when trying to start the job)
Any ideas?
response = client.start_transcription_job({
transcription_job_name: "FirstTranscriptTest", # required
language_code: 'en-US',
media_sample_rate_hertz: 8000,
media_format: "wav",
media: {
media_file_uri: s3_url, # 'https://crm-assistant-transcribe-transcriptions.s3-us-west-2.amazonaws.com/test_audio.wav'
},
settings: {
vocabulary_name: "VocabularyName",
show_speaker_labels: true,
max_speaker_labels: 2,
channel_identification: true,
show_alternatives: false,
max_alternatives: 2,
},
job_execution_settings: {
allow_deferred_execution: true,
data_access_role_arn: "arn:aws:iam::my_arn....",
}
})
publish
from multiple threads?
I'm trying to automate creation of EMR instance on event. cli command look like
aws emr create-cluster --auto-scaling-role EMR_AutoScaling_DefaultRole --applications Name=Hadoop Name=Zeppelin Name=Spark Name=Hive Name=Hue Name=HBase --bootstrap-actions
Hello everyone. Happy Christmas!
LoadError (cannot load such file -- aws-sdk-s3):
app/controllers/editor_controller.rb:1:in `<main>'
I am getting this error with require 'aws-sdk-s3'
.
But I have installed both aws-sdk
and aws-sdk-s3
.
I think it is an issue with the version but I am not sure how to fix it.
my rails version is 6.1.0.
Please help me. Thank you.
Hello everyone. Happy Christmas!
LoadError (cannot load such file -- aws-sdk-s3): app/controllers/editor_controller.rb:1:in `<main>'
I am getting this error with
require 'aws-sdk-s3'
.
But I have installed bothaws-sdk
andaws-sdk-s3
.
I think it is an issue with the version but I am not sure how to fix it.
my rails version is 6.1.0.
Please help me. Thank you.
have you tried "require 'aws-sdk'"?
Hello All (Happy New Year). Been seeing allot of this error while uploading to S3. Using ruby v2.5.3
, sidekiq v5.1.3
, aws-sdk-s3 v1.48
Errno::EBADF: Bad file descriptor @ fptr_finalize_flush - /Volumes/Delivery/Client/ACME_THREADS/RoadRunener/tifs/wile_e_coyote.tif
WARN System: /usr/local/lib/ruby/gems/2.5.0/gems/aws-sdk-s3-1.48.0/lib/aws-sdk-s3/file_uploader.rb:48:in `close'
'/usr/local/lib/ruby/gems/2.5.0/gems/aws-sdk-s3-1.48.0/lib/aws-sdk-s3/file_uploader.rb:48:in `open'
'/usr/local/lib/ruby/gems/2.5.0/gems/aws-sdk-s3-1.48.0/lib/aws-sdk-s3/file_uploader.rb:48:in `open_file'
'/usr/local/lib/ruby/gems/2.5.0/gems/aws-sdk-s3-1.48.0/lib/aws-sdk-s3/file_uploader.rb:41:in `put_object'
'/usr/local/lib/ruby/gems/2.5.0/gems/aws-sdk-s3-1.48.0/lib/aws-sdk-s3/file_uploader.rb:34:in `upload'
'/usr/local/lib/ruby/gems/2.5.0/gems/aws-sdk-s3-1.48.0/lib/aws-sdk-s3/customizations/object.rb:308:in `upload_file'
Anyone ran into this before?
String
and StringList
types in AWS Parameter store
? I could tolerate the fact, that StringList parameter is String itself and interface for its input is the same - I just need to use commas. But it seems to have no difference even when getting its value - it returns this string with commas
SSM::Client#get_parameter
for retrieving the value
Hi! I have pre-existing S3 URLs (basically full URLs) that I would like to create signature for. I'm trying code similar to this but getting 'signature does not match' errors when trying out the URLs. I'm using the Aws::Sigv4::Signer
class since it takes a full URL. What could I be doing wrong? I prefer not to have to break up my URLs into its constituent parts (i.e. the key
of each objects, the bucket
, etc) as they are saved as full URLs in the database.
S3_ACCESS_KEY = '********'
S3_ACCESS_SECRET = '*******'
v4_signer = Aws::Sigv4::Signer.new(
service: 's3',
region: 'us-east-1',
access_key_id: S3_ACCESS_KEY,
secret_access_key: S3_ACCESS_SECRET,
)
#this fails (invalid signature)
v4_signer.presign_url(:url => 'https://s3.amazonaws.com/testbucket/test_key.pdf', :http_method => 'GET').to_s
#hostname variants fails (invalid signature)
v4_signer.presign_url(:url => 'https://testbucket.s3.amazonaws.com/test_key.pdf', :http_method => 'GET').to_s
They S3_ACCESS_KEY
and S3_ACCESS_SECRET
work as I have used them in other contexts and with the aws cli.
Appreciate any help on figuring out how to generate these.
Thanks!
Aws.config.update({credentials: Aws::Credentials.new(Settings.access_key_id, Settings.secret_access_key), region: 'us-east-1'})
s3 = Aws::S3::Client.new(credentials: Aws::AssumeRoleCredentials.new(client: Aws::STS::Client.new(region: 'us-east-1',), role_arn: "<my role arn>", role_session_name: "some-external-ID"))