0

My java application is configured on an AMI image (so that I can use Auto Scaling Groups). I want to have the ability to update the app, and as existing AMIs cannot be updated, I would set my launch config to start an external jar file - hosted on S3 - which I can update whenever I wish.

Is it possible to load a jar file from an S3 bucket?

java -jar app.jar

1 Answers1

0

You could have the ec2 use a cloud-init script run the "aws S3 sync" command (r similar) to update the jar file on server startup. That runs before the services get started, so when it starts it'll be the latest version.

You can also run things like "sudo yum update -y" (from memory) to update the OS and packages from cloud-init before the software starts.

Tim
  • 33,870
  • 7
  • 56
  • 84