Backup and Recovery

The Attini Frameworks has state in 3 places:

  1. AWS S3
  2. Amazon DynamoDb
  3. AWS Systems Manager Parameter Store

All data that Attini used during deployments is created during the deployment execution, so you can always delete/truncate all Attini data without risking your ability to re-deploy. However, this data is useful to if you want your deployment history and enabling you to do rollbacks.


Attini data in AWS S3 Buckets

Attini have 2 AWS S3 Buckets per installation:

  1. attini-deployment-origin-{region}-{aws account}
  2. attini-artifact-store-{region}-{aws account}

Both buckets have version history enabled and a life cycle policy to delete non current objects after 30 days. So any objects that are overwritten or deleted can be restored for 30 days.

Note

When you deploy a new version of an Attini Distribution, it does not overwrite any files in attini-artifact-store-{region}-{aws account}. So the files life cycle will be determined by the retention configuration.

Attini data in Amazon DynamoDb

Attini have 2 Amazon DynamoDb tables:

  1. AttiniDeployData
  2. AttiniResourceStates

Both tables have Point in time recovery enabled. If you want to make extra backups of these tables, you are free to do so using your own backup tools.

This data is only used during deployments, so if it is deleted, it will not affect your new deployments. The only Attini features you will lose if the data is lost is the CLI command attini deploy history.

If any data in these tables are deleted by mistake, you can follow these steps:

  1. Do a restore to a new DynamoDb table from the point in time recovery backup.
  2. Copy the data from the new table into AttiniDeployData or AttiniResourceStates tables.

If any of the tables are accidentally deleted and you do not have any manual backups the data is lost.

Manually getting the Deployment history if DynamoDb tables are lost

An ordered list of the 100 latest versions of all distribution IDs are also saved as parameter history in AWS Systems Manager Parameter Store. You can find then under the path /attini/distributions/{environment}/{distribution name}/latest.

Using these parameters, you can find any distribution in the s3 bucket attini-artifact-store-{region}-{aws account} that is still saved by your retention configuration (see RetainDistributionDays and RetainDistributionVersions).

Attini data in AWS Systems Manager Parameter Store

An ordered list of the 100 latest versions of all distribution IDs are saved as parameter history in AWS Systems Manager Parameter Store. You can find then under the path /attini/distributions/{environment}/{distribution name}/latest.

These parameters are not backed up, so if they are deleted, the data is lost.

If the data in DynamoDb is intact, you can still get the versions within your retention configuration retention configuration (see RetainDistributionDays and RetainDistributionVersions) by using the Attini CLI attini deploy history -e {environment} -n {distribution name}