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
0
votes
1 answer

How do you set a Content-Type Header for the Ruby AWS SDK?

I'm using Webmock to test http requests made by the ruby aws-sdk (in this case aws-sdk-batch). Webmock handles json requests with a much more convenient hash diff and partial matching when the requests fail, but it will only do so if the…
Jacob Dalton
  • 1,643
  • 14
  • 23
0
votes
1 answer

Dumping Cognito users to JSON using Ruby causes the results to be [FILTERED]

I'm trying to backup Cognito users using the AWS Ruby SDK. Everything is going well except when I call to_json on any users attributes, it outputs every value as "[FILTERED]". If I use to_yaml instead it seems to work fine. Is there a reason that…
Richard Hurt
  • 2,049
  • 24
  • 32
0
votes
1 answer

S3 Upload/Download Timeout Issues

I'm attempting to create a kmz format file of geotagged images, using S3 file storage and sdk access through a ruby-on-rails app on Heroku. I'm running the file processes when the "project" view loads, but the instance methods I've written to access…
0
votes
1 answer

aws-sdk-ruby v3 not giving the iam policy in proper json format

I want to retrieve the policy document associated with the iam role and policy using aws-sdk and ruby. Using aws cli, I am getting the proper output but using aws sdk and ruby getting encrypted json output. aws iam get-role-policy…
0
votes
1 answer

Using the Ruby SDK, how do I get a handle to an existing AutoScalingGroup?

I'm trying to suspend ASG processes during a CodePipeline deployment using the Ruby SDK. I can get the AutoScaling Client but I can't seem to be able to convert that group to an object. client = Aws::AutoScaling::Client.new asg =…
Richard Hurt
  • 2,049
  • 24
  • 32
0
votes
1 answer

DynamoDB put_item error ‘no such member’ (Ruby SDK)

I’m using the Ruby SDK aws-sdk-dynamodb with Ruby 2.5 for an AWS Lambda function that saves an item to an AWS DynamoDB table. I can successfully save an item with this code: def save! hash = { table_name: ‘my-table’, item:…
Daniel Kehoe
  • 10,952
  • 6
  • 63
  • 82
0
votes
0 answers

Ruby AWS SDK (v2/v3) Tag spot instances

According to this link it is possible to tag spot fleet instances. Tags are automatically propagated to the launched instances. Is it possible to do the same for normal spot instances? My approach so far ec2 = Aws::EC2::Resource.new({region: region,…
Rojj
  • 1,170
  • 1
  • 12
  • 32
0
votes
2 answers

Finding S3 aggregate content length of assets with a specific path prefix

I have customer assets stored in S3 an account-related value serving as the first element in the path to each asset, e.g. account-1/media/video/382476581823.mp4 account-1/images/2348752.png I would like to find the total amount of storage being…
AndyV
  • 3,696
  • 1
  • 19
  • 17
0
votes
1 answer

AWS SDK not including Access Key (AKID) in X-Amz-Credential when creating presigned post, but only on Heroku

I am doing a direct to S3 upload, and I have the presigned post declared like this: @s3_direct_post = S3_BUCKET.presigned_post(key: "images/#{SecureRandom.uuid}/${filename}", success_action_status: '201', acl: 'public-read', allow_any: ['utf8',…
Vincent Taglia
  • 173
  • 1
  • 3
  • 12
0
votes
1 answer

How to access private and public images in the same Ruby on Rails app from s3 using paperclip

The Application I am writing an application that requires getting the pictures from users and saving them in AWS S3 bucket. app/models/picture.rb class Picture < ActiveRecord::Base include Paperclip::Glue belongs_to :user scope…
0
votes
1 answer

How to query over range of range key of dynamodb?

I'm using 'aws-sdk', '~> 2.6.44'. I've an activities table where I store all the activities performed by a user. params = { table_name: 'activities', # required key_schema: [ # required { attribute_name:…
Indyarocks
  • 643
  • 1
  • 6
  • 26
0
votes
1 answer

How can I change the S3 storage class of an Object / Directory using Ruby SDK?

I cannot find a method comparable to the changeOutputStorageClass method from the Java SDK. I also have heard that there is a way to do this via AWS CLI, but I am trying to utilize the Ruby SDK.
0
votes
1 answer

AWS-SDK-RUBY stub a call to get_object

How do you stub a call to get_object using a client & encrypted client? Goal is to write rspec tests to get_object using the following clients. Does anyone have a "get_object" working example they can share? I am aware of various web pages that…
0
votes
1 answer

aws-sdk-ruby Aws::ACM::Client#import_certificate File paths or contents of files

I'm trying to use the aws-sdk-ruby to import Certificates to ACM. However, when I try to use the Aws::ACM::Client#import_certificate using either of the following methods, the stack trace tells me my private key is not 1024 or 2048. If that were the…
FilBot3
  • 3,460
  • 6
  • 33
  • 55
0
votes
1 answer

What can be possible values of response-content-type in object.get API

What can be possible values of response-content-type in object.get API. It's description says: Sets the Content-Type header of the response. Type: String But I don't see possible values in the docs. Why I ask is one of the possible value might…
Saurabh
  • 71,488
  • 40
  • 181
  • 244