Questions tagged [aws-sdk-ruby]

The official AWS SDK for Ruby is a gem used to access many AWS services such as S3, EC2, DynamoDB, Glacier, SQS, SimpleDB, Elastic Beanstalk and more.

The AWS SDK for Ruby is an official gem provided to facilitate interactions with numerous AWS services. For version 3, services have been modularized into individual gems that can be imported, such as aws-sdk-s3 or aws-sdk-ec2. Alternatively, the aws-sdk gem will import every available service gem.

This tag can be used for questions regarding either the general aws-sdk gem, or any of its supported services gems.

Resources:

101 questions
3
votes
2 answers

Delete all items in DynamoDB table using Ruby

I'm trying to write a simple ruby script that delete all items in a DynamoDB table, but I'm having trouble understand which argument to pass to "delete_items", this is what I have so far: dynamoDB = Aws::DynamoDB::Resource.new(region:…
duduamar
  • 3,816
  • 7
  • 35
  • 54
2
votes
3 answers

aws-sdk-core/xml/parser.rb:74:in `set_default_engine': Unable to find a compatible xml library), Ruby version 3.0.2

I am having a legacy ruby daemon script that runs on a linux server. On upgrading all ruby and gem package versions with in the instance, the daemon script is now erroring out. Same error I am getting with in…
Sarga
  • 149
  • 3
  • 16
2
votes
0 answers

Ruby on Rails - AWS Signature Version 4

I have a Ruby on Rails app and I am currently getting this message. What's the best way to go about resolving this issue? Ruby 2.5.8 Rails 5.2 Following AWS Gems are available: * aws-eventstream (1.1.0) * aws-partitions (1.417.0) *…
Aaron A
  • 535
  • 7
  • 20
2
votes
0 answers

How determine level error of aws s3 sdk errors?

Question I'm trying to determine wether an error returned by the AWS ruby SDK is a server error or a client error. Using gem 'aws-sdk-s3', '~> 1'. Looking at the documentation:…
2
votes
0 answers

AWS EC2 Instance Profile for S3 permissions inconsistent

Background: I'm writing an automated deployment script to deploy a ruby on rails application to AWS on an EC2 instance using S3 as the storage for ActiveStorage. My script creates an instance profile/role and attaches it to the EC2 instance on…
mattwise
  • 1,464
  • 1
  • 10
  • 20
2
votes
1 answer

DynamoDB returning Numbers as decimals not integers in Ruby

I’m storing a few numbers in a Map. They’re being set correctly, and appear in DynamoDB interface correctly: results List [1] 0 Map dateTimeCompleted Number : 1554138543 questionsAnswered Number : 10 questionsCorrect…
Zoe Edwards
  • 12,999
  • 3
  • 24
  • 43
2
votes
1 answer

Encoding Error Using AWS S3 Select with the AWS SDK for Ruby

I am trying to do the following: download the output of an Athena query from S3 (file.csv) gzip the output and upload to a different S3 location (file.csv.gz) use S3 Select from within the Ruby SDK to query the contents of file.csv.gz I always get…
Sam in Oakland
  • 113
  • 1
  • 7
2
votes
0 answers

SignatureDoesNotMatch for presigned-url with get_object

Pretty simple stuff (I thought). I'm attempting to create a pre-signed url that I can then use to download a file. The IAM user these keys correspond to have fullS3Acess until I can figure out why this signature isn't working. def presigned_url …
Msencenb
  • 5,675
  • 11
  • 52
  • 84
2
votes
1 answer

Localstack: awscli works, aws-sdk raise errors

I want to use localstack with ruby aws-sdk. It seems the aws sdk miss some configuration or has a bug, it raises error: After a Aws::S3::Resource.new.bucket('mybucket').exists? it raises a: /usr/local/lib/ruby/2.2.0/net/http.rb:879:in…
2
votes
0 answers

Aws ElasticTranscoder Ruby SDK multiple inputs

I'm trying to transcode multiple files into one mp4 output with Aws ElasticTranscoder but I'm getting always the same error: "missing required parameter params[:input]" and "unexpected value at params[:inputs]" and I dont know why. According the Aws…
2
votes
1 answer

Getting error Aws::S3::Errors::InvalidBucketName when creating bucket

I am trying to create a bucket, with help of aws-sdk-ruby from ruby console. Following is the code I am running in my console: Aws.config.update({ :region => "myRegion", :credentials => Aws::Credentials.new("access_key", "secret_key"), …
Saurabh
  • 71,488
  • 40
  • 181
  • 244
2
votes
1 answer

How to parse a string with comma separated values in AWS IoT SQL?

I am trying to parse a long string with comma-separated values such as "lat,long,distance,,elevation". String is actually quite long and I need to fetch each value and save the fetched values in different columns in dynamodb. I am using dyamodbv2…
Parth Modi
  • 1,675
  • 2
  • 20
  • 26
2
votes
1 answer

How do you create an AWS Cloudfront Distribution that points to an S3 (static hosted) Website Endpoint using the SDK?

I have an S3 bucket configured as a website endpoint to host a static web page. I want to put Cloudfront in front of it. I copied the "Endpoint" from the S3 Bucket's "Properties" :: "Static Website Hosting." It is of the form: …
1
vote
0 answers

AWS-SDK-SES: How Can I Check the Existence of an Email Address in Rails?

I currently have Rails applications that use SES to send emails. Unfortunately no matter how much code I put in my application I still get emails with invalid email addresses. I want to use AWS to verify if I have a valid email address, meaning that…
1
vote
2 answers

How can I update a lifecycle configuration with a filter based on both prefix and multiple tags in Ruby?

I want to put a lifecycle_configuration to an S3 bucket with a rule that uses a filter with multiple tags and a prefix. I can successfully put_lifecycle_configuration if the filter uses only one tag or one prefix, but I get a…
aenw
  • 841
  • 9
  • 18