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 environments to avoid this.

The biggest problems related to running multiple environments in one AWS account are:

  1. Difficulties designing least privileges IAM Roles/Polices.
  2. Environments share AWS Service limits.
  3. 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:

  1. The AttiniEnvironmentName CloudFormation Parameter.
  2. The Attini Runner environment variable ATTINI_ENVIRONMENT_NAME.
  3. The Deployment plan payload .

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 }

The attini environment create CLI command is idempotent, so it can be run multiple times within any scripts, and it will create environments if It’s not already created. The command can also be used to update the environment type.

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’re 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’re 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.