Results 1 to 5 of 5

Thread: Associate Elastic IP on Startup via User-data

  1. #1

    Default Associate Elastic IP on Startup via User-data

    I'm trying to streamline the EC2 startup process for third party clients.
    What I need to do is have an elastic IP address associate with a WOWZA EC2 instance when I boot up. Is it possible to do this via user data?
    If anyone has an example, it will be most useful. many thanks

  2. #2
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    This is not possible with Wowza Startup package, as far as I know. I'm not sure how to automate that except with EC2 command line tools

    Richard

  3. #3

    Default

    Thats a drag, EC2 instances are great to fire up on demand, but having to manually assign IP too makes it a bit more cumbersome - or is there another way?

  4. #4
    Join Date
    Dec 2011
    Posts
    1

    Default

    Quote Originally Posted by sonick View Post
    I'm trying to streamline the EC2 startup process for third party clients.
    What I need to do is have an elastic IP address associate with a WOWZA EC2 instance when I boot up. Is it possible to do this via user data?
    If anyone has an example, it will be most useful. many thanks
    I am looking for very something similar. I am using the EC2 API to try and script this and got half way there.


    set JAVA_HOME=C:\Program Files\Java\jre6
    set EC2_HOME=C:\path-to-ec2-API\ec2-api-tools-1.5.0.1-2011.11.30\
    set EC2_PRIVATE_KEY=C:\PATH-TO-PRIVATE-EC2-CERT\PRIV.pem
    set EC2_CERT=C:\PATHT-TO-PUBLIC-EC2-CERT\CERT.pem
    ec2-run-instances ami-93824afa -g wowza

    ec2-describe-instances

    ec2-associate-address -i instanceID xx.xx.xx.xx
    ec2-disassociate-address xx.xx.xx.xx

    ec2-stop-instances instanceID


    Looking for a clean way with a dos batch file to parse the ec2-describe-instances for the instance id to pass into the ec2-associate-address -i instanceID xx.xx.xx.xx
    . If not i will have to use another language.

  5. #5

    Default

    You can do it with unix shell (using cut/grep) or windows vbscript, although I have more experience with the former.

    Your methodology is correct, however - once the run-instances is called, run describe-instances against the returned instance ID until status comes back as "running" and then do the associate-address.

    Here's an example on how to do it in unix/bash:

    http://blog.ianbeyer.com/code/ec2-st...tartup-script/

    -Ian

Similar Threads

  1. User account with startup package
    By lakesidechurch in forum Server Administration
    Replies: 3
    Last Post: 04-08-2014, 05:15 AM
  2. Insufficient permissions with ec2-user SSH user, how to log in as wowza user?
    By elyngved in forum Wowza Media Server 3 for Amazon EC2 Discussion
    Replies: 2
    Last Post: 05-24-2013, 01:39 PM
  3. Associate DevPay with custom AMI
    By tpepernic in forum Wowza Media Server 3 for Amazon EC2 Discussion
    Replies: 3
    Last Post: 02-23-2012, 08:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •