skip to Main Content

Problem creating app on aws elastic beanstalk with sample nodejs app

on AWS fresh account, when I try to create an app environment, app get created just fine but when try to create environment inside that app it fails with error message, I am using elastic beanstalk for a long time because I found it very simple and I am creating environment same way as I used-too create it earlier. but only this time I am getting this error message: (no matter what I do it fails, tried to rebuild many times)

Creating Auto Scaling launch configuration failed Reason: Resource
handler returned message: "The Launch Configuration creation operation
is not available in your account. Use launch templates to create
configuration templates for your Auto Scaling groups.

as the matter of fact it was giving me warning message when I was creating environment:

New accounts only support launch templates:
Starting on October 1, 2024, Amazon EC2 Auto Scaling will no longer
support the creation of launch configurations for new accounts.
Existing environments will not be impacted. For more information about
other situations that are impacted, including temporary option
settings required for new accounts, refer to Launch templates in the
Elastic Beanstalk Developer Guide.

I tried to read the document it is referring to, however I didn’t get any clear instruction how to connect it with launch template, I tried to create a launch template in EC2 as a friend suggested me but still don’t know how do I connect that template with elastic beanstalk so it use that launch template and not the out dated launch configuration.

So my question is:

  1. What I am doing wrong?
  2. Is there a setting that I need to change out side of elastic beanstalk?
  3. is there a document or article aws officially or some else have published that I can follow step by step to create elastic beanstalk app with all the compliances of Launch templates whatever it is.

all I want to do right now is create an env with sample nodejs app, thats it.

2

Answers


  1. Chosen as BEST ANSWER

    I realized it was straightforward to follow, and it is right there in the document they are referring to in the warning message:

    New accounts only support launch templates: Starting on October 1, 2024, Amazon EC2 Auto Scaling will no longer support the creation of launch configurations for new accounts. Existing environments will not be impacted. For more information about other situations that are impacted, including temporary option settings required for new accounts, refer to Launch templates in the Elastic Beanstalk Developer Guide.

    If you follow Option settings for launch templates heading in this document, it gives a very simple few options to set while creating the elastic beanstalk app in the AWS web console and it will automatically follow new compliance and you don't have to change anything outside of elastic beanstalk

    According to the document you need to set at least one of the below options to direct Elastic Beanstalk to create an environment with a launch template.

    • RootVolumeType option set to gp3.

    • BlockDeviceMappings option contains gp3.

    • DisableIMDSv1 option set to true.

    • EnableSpot option set to true.

    Now where the problem came from, when I create an elb app I usually set DisableIMDSv1 to true so it uses v2 instead of v1. While creating an elb app this option is set to true by default, so if you create an elb app with the default setting everything should work smoothly, but the problem is for some people(as I found on a internet) only setting DisableIMDSv1 option is not working for them and so they need to set more than 1 option from above mentioned 4 options. So what I did was I set RootVolumeType and EnableSpot too, however, I didn't see BlockDeviceMappings anywhere, it worked just fine for me and the application was created as expected.

    Later I went back to ec2>launch template then I noticed it automatically created a launch template and used it for the elb app. no need to touch the launch template manually.


  2. You’re trying to use a feature that is no longer supported (Launch Configuration). You’ve done a great job on identifying you need to use a Launch template instead!

    You should be able to follow these instructions to set up a Launch Template for your Elastic Beanstalk environment.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search