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 8015275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:12:31+00:00 2026-06-04T20:12:31+00:00

I am attempting to load user data into an Ubuntu 12.04 LTS AMI (ami-a29943cb,

  • 0

I am attempting to load user data into an Ubuntu 12.04 LTS AMI (ami-a29943cb, but I’ve tried a few others to no avail) via boto’s ec2.run_instances(…, user_data=USER_DATA). Similarly, I have had no success with manually supplying the user data while launching the instances via the AWS console. There are no results or messages in /var/logs/syslog for any of the methods I’ve tried.

USER_DATA looks something like the following, read in as a string from a file:

#!/usr/bin/env python

import boto

AWS_BOOTSTRAP_BUCKET  = ''
AWS_ACCESS_KEY_ID     = ''
AWS_SECRET_ACCESS_KEY = ''

# Pull processing script from S3.
print 'Bootstrapping started.....'
print 'Connecting to S3...'
s3     = boto.connect_s3(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
bucket = s3.get_bucket(AWS_BOOTSTRAP_BUCKET)
print 'Downloading bootstrap file...'
key    = bucket.get_key('xxx')
key.get_contents_to_filename('xxx')

print 'Importing Bootstrap file...'
import xxx
xxx.process()

# Shut down the EC2 instance running this process.
print 'Shutting down this instance...'
import socket
desired_hostname = socket.gethostname()
ec2 = boto.connect_ec2(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
reservations = ec2.get_all_instances()
for reservation in reservations:
    for instance in reservation.instances:
        if desired_hostname in instance.private_dns_name:
            instance.terminate()

I have furthermore tried uploading the file to a public S3 bucket and loading it in this manner, once again to no avail:

#include
https://s3.amazonaws.com/bucket/file.py

Does anyone have any advice in this regard? Am I completely misunderstanding the purpose of user-data/cloud-init or is the technology merely broken in the AMI I am trying to utilize?

  • 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-04T20:12:33+00:00Added an answer on June 4, 2026 at 8:12 pm

    It’s hard to know what happened without an error message, but there are a few places you can look:

    1. The file /var/log/cloud-init.log will usually contain any errors (e.g. boto import failure) that occurred during instance bootstrapping.
    2. The directory /var/lib/cloud/instance will contain the raw scripts and user-data downloaded to the instance
    3. You can View/Edit USER_DATA inside the AWS console by right-clicking the instance, to see if boto populated it correctly.

    Looking in those places should help provide clarity.

    I know Ubuntu 12.04 comes with boto 2.2.2:

    root@vanilla-562c:/var/lib/cloud/instance# python
    Python 2.7.3 (default, Apr 20 2012, 22:44:07) 
    [GCC 4.6.3] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import boto
    >>> boto.__version__
    '2.2.2'
    

    ..but I wonder if it’s actually accessible in your PYTHONPATH at runtime.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to load a User object from mysql but I keep getting UnboundExecutionError:
I am attempting to load some images into a very basic C++/SDL based program.
I am attempting to load up an entire array of NSManagedObjects into an NSArray,
I am attempting to load a webpage with file_get_contents(), and am running into problems.
I am attempting to load dynamic data based on the specific URI segment thats
In my Rails 3 app I am attempting to load a User's tweets in
I'm attempting to load a list of groups for a user and wanting to
So basically I am thinking about attempting load testing on my asp.net application using
Im attempting to load a hex literal from an xml settings file, I can
I am attempting to load multiple images in AS3 and I'm exploring different options

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.