Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

400
Views
Add tags to an existing S3 object using the ruby AWS SDK

AWS does let you add tags to an existing S3 bucket, using the console, or this http api for instance: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html

But rather than use the HTTP API directly, is there any way to use the ruby AWS SDK v3 to add (or remove?) tags to an existing S3 object?

I haven't been able to figure it out.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

OK, answering my question, I eventually found a method on Aws::S3::Client

https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Client.html#put_object_tagging-instance_method

s3_client = Aws::S3::Client.new
s3_client.put_object_tagging({
                bucket: "bucket_name",
                key: "some/key.jpg",
                tagging: {
                  tag_set: [
                    {
                      key: "tag-name",
                      value: "tag value",
                    }
                  ]
                }
})

i was expecting there to be a method on Aws::S3::Bucket or Aws::S3::Object, but if there is I can't figure it out! But I have verified this one on Aws::S3::Client as working for me.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!