Reputation:
I have one running RDS(MSSql Server) and EC2 instance. I found some solutions to stop and start instances automatically through the Lambda expression at a specific interval. I want to apply one of these solutions to start and stop RDS(MSSql Server) and EC2 instance. This action makes me worried about that Does it affect my EC2 instance data or RDS instance data and volumes? Will it be good to start and stop these instances?
Upvotes: 3
Views: 470
Reputation: 59976
It's fine to stop EC2 instance and data the will be persistent, stoping instance from lambda is same as stopping instance from AWS console, or aws-cli.
When you stop a running instance, the following happens:
The instance performs a normal shutdown and stops running; its status changes to stopping and then stopped.
Any Amazon EBS volumes remain attached to the instance, and their data persists.
Any data stored in the RAM of the host computer or the instance store volumes of the host computer is gone.
In most cases, the instance is migrated to a new underlying host computer when it's started.
Where for RDS, stop last for seven days only and the RDS will start automatically after 7 days. for stopping RDS is fine also same applied to RDS.
You can stop an instance for up to 7 days at a time. After 7 days, it will be automatically started. For more details on stopping and starting a database instance, please refer to Stopping and Starting a DB Instance in the Amazon RDS User Guide.
Does it affect my EC2 instance data or RDS instance data and volumes? Will it be good to start and stop these instances?
No, only data RAM affected. if you are not using regular then stopping is good to save cost.
Upvotes: 2