m-chandler / factorio-spot-pricing

Factorio Deployment to AWS
MIT License
98 stars 25 forks source link

EC2 instance not being recreated after stack changes #13

Closed kdawgwilk closed 4 years ago

kdawgwilk commented 4 years ago

I setup the stack originally with no SSH access and then went to update the stack variables to turn that on and the LaunchConfiguration was updated to have the KeyName I set but the ec2 instance was never terminated and recreate with the new launch config so I still can't connect. I went to manage the instance to see if I could terminate it manually but there was a warning

On an EBS-backed instance, the default action is for the root EBS volume to be deleted when the instance is terminated. Storage on any local drives will be lost.

Which scared me thinking I would lose save data.

kdawgwilk commented 4 years ago

Looks like stopping the stack and starting it again got a new ec2 up and running with the keypair

m-chandler commented 4 years ago

Hi Kayden, The EC2 instance is completely ephemeral. It can be deleted, or restarted - you'd only lose progress up to your last autosave (5 mins by default). All data is stored on a network share (EFS), which is only deleted if you actually delete the CloudFormation stack. If you terminated the EC2 instance, this would have achieved the same effect as stopping / starting the server via the CloudFormation parameter (as you did). Hope this clears things up, but it sounds like you've got it sorted anyway.

m-chandler commented 4 years ago

Actually you might not even lose any data, as the container should save on shutdown anyway. Worse case, you'd just lose data since your last autosave.