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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:52:43+00:00 2026-05-27T11:52:43+00:00

I need the application server, which is beanstalk instances, to do some actions upon

  • 0

I need the application server, which is beanstalk instances, to do some actions upon startup and I thought of running a bash script passed to the instance with the UserData property which is available to regular EC2 instances.

I’ve found several example CloudFormation templates which does this with regular EC2 instances, but no example with Beanstalk. I’ve tried to add this to the properties field for the application:

    "MyApp" : {
      "Type" : "AWS::ElasticBeanstalk::Application",
      "Properties" : {
        "Description" : "MyApp description",
        "ApplicationVersions" : [{
          ...
        }],
        "UserData" : {
          "Fn::Base64" : { "Fn::Join" : ["", [
            "#!/bin/bash\n",
            "touch /tmp/userdata_sucess\n"
          ]]
        }},
        ...

I also tried to add to the environment part:

    "MyAppEnv" : {
      "Type" : "AWS::ElasticBeanstalk::Environment",
      "Properties" : {
        "ApplicationName" : { "Ref" : "MyApp" },
        "Description" :  "MyApp environment description",
        "UserData" : {
          "Fn::Base64" : { "Fn::Join" : ["", [
            "#!/bin/bash\n",
            "touch /tmp/userdata_sucess\n"
          ]]
        }},
        "TemplateName" : "MyAppConfiguration",
        "VersionLabel" : "First Cloud version"
      }
    },

In both cases this resulted in failure when trying to create the stack. Does anyone know if it is possible to pass UserData to a Beanstalk instance using CloudFormation. If so – can you provide an example.

  • 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-05-27T11:52:44+00:00Added an answer on May 27, 2026 at 11:52 am

    If you want to have all the advantages that Beanstalk offers – like not having to patch the OS which Amazon does for you – this isn’t possible. One option is to create a custom AMI where you include the needed scripts, but then you must manage the OS yourself with security patches. Read more here.

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

Sidebar

Related Questions

I have a client server application in which I need to transmit a user
I have a client server application in which the server and the client need
I need to develop an application which stores data in a SQL Server 2005
I need to detect information about the Application Server my EJBs are running in.
I'm looking to a design a protocol for a client-server application and need some
I have an application running in IIS which connects to a SQL Server 2008
I need to have as part of a desktop application a file server which
We have a Java application server running on Sun Solaris. We now need to
I am running an application on my system on JBOSS server which i can
Please, help me with hook script on server which set svn:mime-type to application/octet-stream on

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.