Create Policy
With StackGuardian, compliance for your workflows and Infrastructure as Code (IaC) is straightforward and flexible. Select from a vast array of over 250 pre-configured policies in our Marketplace, or create custom policies tailored to your needs.
Creating and Implementing Policies​
Step 1: Create Your First Policy​
Start by choosing a ready-made policy from our Marketplace that aligns with AWS's best practices.
- Go to the Policies tab, located next to the Workflow Group tab.
- Create your Policy by defining a Resource Name, adding a Description, and tagging with relevant Tags.
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 Template
field and select the latest version. - Set
Action on pass
toPASS
andAction on fail
toWARN
. - 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.