Create Policy
Overview
With StackGuardian, compliance for your workflows and Infrastructure as Code (IaC) is straightforward and flexible. Create custom policies tailored to your needs.
Creating and Implementing Policies
Step 1: Create Your First Policy
- Go to the Policy Sets tab, located under Develop tab.
- Click Create Policy +.
- Create your Policy by informing:
- Policy Name
- Policy ID: Auto-generated from the Policy Name. You can customize it using only letters, numbers, underscores (_), or dashes (-). This cannot be changed after creation.
- Description
- Tags
- Policy Name
Step 2: Structuring Your Policy Rules
After selecting your policy:
- Visit the Rules section.
- Add a new rule with the following steps:
- Name the rule with a valid slug and choose
Marketplace Policy Template. - Find /stackguardian/aws-best-practices-all in the
Policy Templatefield and select the latest version. - Set
Action on passtoPASSandAction on failtoWARN. - Save your configuration.
- Name the rule with a valid slug and choose
Defining Actions and Approval Process
Specify what Actions to take based on policy evaluation:
- Pass: The policy is compliant.
- Warn: There may be issues with the policy.
- Fail: The policy is non-compliant.
- Approval Required: Manual approval is necessary.
For policies requiring Approval, define the approval process:
- Choose the number of approvers from a pre-defined list, ranging from one to all.
Step 3: Policy Deployment
To apply your policy:
- Return to the Meta tab.
- In the Scope section, select the Workflow or Workflow Group to associate with this policy.
Keep track of active policies in the Overview section of your Workflow.

Fig: Create & Enforce New Policy (aws-best-practices)
info
Now you're all set to launch your workflow with robust policy enforcement.