Amazon-S3 [SOLVED]: Update CloudFormation stack with updated file in Init

Amazon-S3 [SOLVED]: Update CloudFormation stack with updated file in Init

Home Forums Amazon Web Services Amazon S3 Amazon-S3 [SOLVED]: Update CloudFormation stack with updated file in Init

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #246984

    Cloudy Point
    Keymaster

    QuestionQuestion

    In my CloudFormation stack I have AWS::AutoScaling::LaunchConfiguration, and within that I have AWS::CloudFormation::Init with various packages, files, etc.

    One of my files in Init is a .jar that I upload to S3, which the stack grabs. I’d like to make changes to and reupload the .jar, and have the stack update with this new .jar without having to delete and recreate the stack. Can this be done?

    I’ve come across documentation on cfn-hup, but I’m not sure how to specify that the stack update with changes to the files within Init – maybe in the path for the hooks configuration?

    Thanks.

    #246985

    Cloudy Point
    Keymaster

    Accepted AnswerAnswer

    Just update the stack with the new file reference to the S3 jar file. No need to delete the stack. An update will create a new launch configuration with the new file reference.

    Then re-launch your instances as needed. Then each instance will have the new jar file.

    Source: https://stackoverflow.com/questions/47911502/update-cloudformation-stack-with-updated-file-in-init
    Author: Rodrigo M
    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.