How aws ec2 persists installed applications on the root device volume

problem description

when you buy an ec2, startup instance, you install the centos7 system, and the root device volume is stored in EBS (gb2). After the
instance started successfully, I started to install programs such as apache php mysql ftp. After installation, I restarted the instance due to some problems. Then I found that some of my previous data were missing. For example, some of the programs I installed in ftp, have been restored. For example, SELINUX=disabled sudo setenforce 0, which I set up by myself, is also automatically restored.
there is another problem when stopping the instance, when starting, it is found that all the previously installed software is gone, and only the centos system is retained.
doesn"t feel like the EBC root device volume can hold data for a long time, as officials say. Can"t I use it?

the platform version of the problem and what methods you have tried

can only create snapshots to save system data after installation? Different from domestic Aliyun. Aliyun there are all previously installed applications that you stop or restart after you install.

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

can ec2, like Aliyun, persist my installed applications and other data after installation, regardless of whether you restart or stop the instance

Jan.21,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37856-2c0a9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37856-2c0a9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?