Aws-cli: Launch Config copy funtion

Created on 9 Oct 2014  路  31Comments  路  Source: aws/aws-cli

Would like to have the ability to copy launch configs from the CLI like we now can in the console. It would make it nice to script against when all you need to do is swap the AMI.

feature-request

Most helpful comment

Based on community feedback, we have decided to return feature requests to GitHub issues.

All 31 comments

+1... can't stress enough how much we would like to have this functionality in place.

+1
The actual support on the launch configurations is quite annoying. Just changing basic parameters as the instance type or the AMI are tasks that most of the people using AWS is doing one way or another.

I'm finding incredibly tricky to do this in a repeatable and scripted way, wondering if I'm missing something... But this would make it way easier

+1

+1

+1
Also noting that when I have binary user data, the console version of this appears to corrupt the user data when it is copied to the new launch configuration. The reason I went hunting for a cli alternative was to preserve the integrity of the user data (by processing it with base64 encoding enabled).

+1

+1
In our deployment scenario we simply need to change the AMI of an existing launch config.

In our deployment scenario we simply need to change the AMI of an existing launch config via aws cli please?

Another +1 for this feature. I also have several LCs to update with a new AMI. I'm currently working on scripting it out, but it would be super nice if I didn't need to make ~5 API calls to make it happen

+1

+1

+1

+1

+1 Much needed feature and would at least make my job much quicker

Another +1, replacing an AMI could be a LOT less painful.

+1

馃憤

馃憤

+1

Good Morning!

We're closing this issue here on GitHub, as part of our migration to UserVoice for feature requests involving the AWS CLI.

This will let us get the most important features to you, by making it easier to search for and show support for the features you care the most about, without diluting the conversation with bug reports.

As a quick UserVoice primer (if not already familiar): after an idea is posted, people can vote on the ideas, and the product team will be responding directly to the most popular suggestions.

We鈥檝e imported existing feature requests from GitHub - Search for this issue there!

And don't worry, this issue will still exist on GitHub for posterity's sake. As it鈥檚 a text-only import of the original post into UserVoice, we鈥檒l still be keeping in mind the comments and discussion that already exist here on the GitHub issue.

GitHub will remain the channel for reporting bugs.

Once again, this issue can now be found by searching for the title on: https://aws.uservoice.com/forums/598381-aws-command-line-interface

-The AWS SDKs & Tools Team

This entry can specifically be found on UserVoice at: https://aws.uservoice.com/forums/598381-aws-command-line-interface/suggestions/33168355-launch-config-copy-funtion

Based on community feedback, we have decided to return feature requests to GitHub issues.

+1

+1

+1

+1

+1

+1 @jamesls isn't 4yrs a good time to end darkness around the issue?

+1 @jamesls isn't 4yrs a good time to end darkness around the issue?

FYI, I got fed up and created my own shell script for this. https://github.com/varunchandak/automate-launch-configuration-update-with-latest-image

@varunchandak Interesting !

Managed to acheive this with the following stage in a Jenkins pipeline (using plugins: pipeline-utility-steps and pipeline-aws-plugin )

stage('Make a new Launch Configuration'){
      steps{
        withAWS(region: 'eu-west-1', credentials: 'JenkinsSlaveCred'){

          sh "aws autoscaling describe-launch-configurations --launch-configuration-names ${env.CURRENT_LAUNCHCONF} --query \"LaunchConfigurations[0]\" > CurrentLC.json"
          sh "cat CurrentLC.json"
          script{
            jsonfile = readJSON file: 'CurrentLC.json'
            jsonfile.ImageId  = env.NEW_AMI
            jsonfile.LaunchConfigurationName = "jenkinsgeneratedLC" + BUILD_ID
            jsonfile.remove('LaunchConfigurationARN')
            jsonfile.remove('CreatedTime')
            jsonfile.remove('KernelId')
            jsonfile.remove('RamdiskId')
            writeJSON file: 'LaunchConfig2.json', json: jsonfile, pretty: 4
          }
          sh "cat LaunchConfig2.json"
          sh "aws autoscaling create-launch-configuration --cli-input-json file://LaunchConfig2.json"
          sh "aws autoscaling describe-launch-configurations --launch-configuration-names jenkinsgeneratedLC${BUILD_ID}"
        }
      }
    }//end stage ('Make a new Launch Configuration')

+1 @jamesls isn't 4yrs a good time to end darkness around the issue?

FYI, I got fed up and created my own shell script for this. https://github.com/varunchandak/automate-launch-configuration-update-with-latest-image

Hi @varunchandak / @jamesls .. i too need same procedure in terraform . can you pls let me know if you found this by terraform pls ..thanks

Was this page helpful?
0 / 5 - 0 ratings