If you simply want the instance to start out with a fixed starting point each time it runs, then you could:
-
Create your own AMI and run that as the instance each time, or
-
Specify a user-data script that installs and configures software to your specifications each time a new instance is started from a standard base AMI.
If you need to keep state between instance runs, then you’ll need to save the data somewhere outside of the instance/AMI. For example:
-
The data could be kept up to date on S3, SimpleDB, DynamoDB, RDS, etc.
-
You could designate a permanent EBS volume that the instance dynamically attaches and mounts at startup. This could be done with a user-data script.