Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8437289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:23:25+00:00 2026-06-10T07:23:25+00:00

I have a custom AMI that failed half way through the upload using ec2-upload-bundle

  • 0

I have a custom AMI that failed half way through the upload using ec2-upload-bundle but the remaining items were uploaded via the AWS control panel. However, this means that about half of the bundled parts of the bucket are missing the “za-team” grantee which appears to be required for the AMI to launch successfully. How can I go about applying the relevant “Open/Download” permissions to the “za-team” in bulk to the files that are missing it in the bucket?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:23:26+00:00Added an answer on June 10, 2026 at 7:23 am

    This took me a little while to figure out as I’m new to Ruby; however, the following loops over all of the files in the bucket and appends the permissions indicated on the files. The relevant SDK documentation on the acl.grant command gives a bit of information on what the script is doing.

    #!/usr/bin/ruby
    
    # -----------------------------------------------------------------------------
    # This script provides a means of updating all of the files in an S3 bucket to
    # have the correct permissions. As this script is effectively throwaway it 
    # doesn't do much beyond making sure it runs at least once, however, is worth
    # keeping around as a reference in the event the problem arises again.
    # -----------------------------------------------------------------------------
    require 'rubygems'
    require 'aws-sdk'
    
    # The following is the Amazon ID for the za-team group which is used for EC2
    # operations in S3 buckets
    za_team = '6aa5a366c34c1cbe25dc49211496e913e0351eb0e8c37aa3477e40942ec6b97c'
    
    # Note the configuration points
    AWS.config({
      :access_key_id => '[Access Key Here]',
      :secret_access_key => '[Secret Access Key Here]',
    })
    bucket_name = '[Bucket Name Here]'
    
    # Get the bucket information
    s3 = AWS::S3.new
    bucket = s3.buckets[bucket_name]
    
    # Update the ACL for each item in the bucket
    bucket.objects.each do |object| 
      puts object.key
      acl = object.acl
      acl.grant(:read).
          to(:canonical_user_id => za_team)
      object.acl = acl.to_xml
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have custom gallery. Gallery represents items that are frame layout. There are one
I have TeamCity (7.0.2) successfully spinning up an EC2 VM from a custom AMI,
I have a custom exception filter that I'm using to catch a custom exception
I have a custom control that has an Items property. I Have applied an
I have custom classes that I currently instantiate within App.xaml as resources. I want
We have custom headers in the Silverlight DataGrid using the ContentTemplate. We've got a
I have custom event that has several different subscribers who will all use the
I have custom component that I can place in my layout file (XML) for
I figured that using my own custom pin image for annotations would be super
HI have a custom view class that is loaded and placed within my main

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.