Attini environments¶
All Attini deployments target an environment which is a logical separation between cloud resources, meaning that the framework will separate files and other deployment data from each other.
Warning
If you have multiple environments in one AWS account, there’s a high risk that environments affect each other in different ways, and you have to design your Cloud environment to avoid this.
The biggest problems related to running multiple environments in one AWS Account are:
Difficulties designing least privileges IAM Roles/Polices.
Environments share AWS Service limits.
Conflicting names (this can be mitigated by including the environment name in any cloud resource name, including CloudFormation stacks).
For these reasons, we recommend keeping different environments in different AWS Accounts.
Your deployments can automatically access the environment name via:
The AttiniEnvironmentName CloudFormation Parameter.
The Attini Runner environment variable ATTINI_ENVIRONMENT_NAME.
Create environments¶
Before you can deploy a distribution to an environment, Attini requires you to create it using the command:
attini environment create [ environment name ] --env-type [ production | test ]
Examples:
attini environment create prod --env-type production
attini environment create dev --env-type test
–env-type flag¶
Allowed Values: production
|| test
Default: production
If you are deploying to a production
environment, the Attini CLI will prompt for confirmation when doing new deployments.
If the environment type is test
, new deployments will run directly.
Remove environments¶
If you are deprecating an environment, or if the environment was created by mistake, they can easily be removed with the command:
attini environment remove [ environment name ]
The “attini environment” is just a logical confirmation that enables or disables new deployments,
so removing them is always safe (the command will NOT remove any cloud resources belonging to
the environment). If you remove an environment by mistake, you can easily re-create it using
attini environment create
command.
Note
If you want to delete all resources belonging to an environment, you must do it yourself.