Prerequisites
Before setting up Amorphic CICD, ensure the following prerequisites are in place.
Repository Configuration
Amorphic CICD currently supports remote Git repositories hosted on GitLab, GitHub, Bitbucket, and AWS CodeCommit.
- Ensure the repository exists in one of these providers.
- Create appropriate branches (e.g.,
dev,test,prod) to map to corresponding Amorphic environments. - Apply access controls or branch protection rules to prevent accidental deployments or modifications.
Amorphic Deployment
- Amorphic environments (
dev,test,prod) must already be deployed in AWS accounts. - Each environment is linked to a specific repository branch during CICD deployment.
- Confirm your Amorphic version and choose the matching CI/CD release from CI/CD and SDK compatibility matrix before you deploy.
Service User
A service user is required in each Amorphic environment to manage resource deployments via CICD. This user is dedicated to CICD operations and should not be used for regular user activity.
-
Create a role with permissions to create, update, and delete resources.
- We recommend assigning the Administrator role or an equivalent role with full permissions.
- Assign this role to the service user.
-
Collect the following details from each Amorphic environment:
- Authentication token → CICD supports either a Personal Access Token (PAT) or a service user token. Ensure the token is active and has sufficient validity for resources deployments.
- UserId → The identifier of the service user.
- API Gateway URL → The base URL of the Amorphic API (different from the Amorphic UI URL). This can be obtained by inspecting API requests in the Amorphic UI.
- RoleId → The ID of the role assigned to the service user.
Service User Token in Pipelines
A service user token is a token generated for a non-human service account used specifically for automation. Users can also create a PAT Token (long lived) for Service User and can utilize that in CICD. In CICD, this token can be used anywhere the pipeline expects AMORPHIC_AUTHORIZATION_TOKEN.
For detailed guidance on creating and managing service users, see the Amorphic Service User documentation.
Use a service user token when:
- You want deployments to run independently of an individual user's account lifecycle.
- You want clearer ownership and auditability for automated pipeline actions.
Configuration steps:
- Create or identify a service user with the required deployment permissions.
- Generate a service user token in the target Amorphic environment.
- Store the token in your CI/CD secret manager (for example, AWS Secrets Manager, GitHub Actions Secrets, GitLab CI/CD Variables, or Bitbucket secured variables).
- Inject the token into pipeline runtime as
AMORPHIC_AUTHORIZATION_TOKEN.
Example pipeline usage:
AMORPHIC_AUTHORIZATION_TOKEN=<service_user_token_value>
Alerting Configuration
When deploying the Amorphic CICD framework, administrators must provide a list of email addresses.
- These emails will receive alerts if the pipeline fails to deploy resources.
- Each alert email contains a link to the Code Validation and Deployment Logs for troubleshooting.
CICD Deployment
- The Amorphic CICD framework is deployed in a separate AWS account after fulfilling the above prerequisites.
- Ensure all developers subscribe to AWS SNS email notifications to stay informed about CICD events.