Custom frameworks and controls
AWS Assurance supports custom frameworks for standards that aren’t in the managed framework catalog, such as an internal security policy, a contractual obligation, or a regulation. You define the controls, and AWS Assurance assesses them the same way that it assesses the controls of managed frameworks.
Structure of a custom framework
A custom framework has three levels:
- Control group
-
A named group of related controls, for example
ACCESSfor access management. Every control belongs to exactly one control group. A control group can’t contain other control groups. - Control
-
A single control that AWS Assurance assesses. Each control has a workflow type that determines how AWS Assurance evaluates it. For more information, see How AWS Assurance evaluates custom controls.
- Requirement
-
An atomic check within a control. An assessment scores each requirement on its own. Findings, assessment results, and remediation tasks refer to a requirement by its ID.
Control groups and controls share one set of IDs within a framework version. A control can’t have the same ID as a control group in the same framework version.
Custom framework lifecycle
Each version of a custom framework moves through these statuses:
- Draft (
PENDING) -
You can add, change, and delete the framework’s control groups and controls. You can’t enable a draft in a project. The web application lists drafts on the Draft tab of the Frameworks tab.
- Published (
ACTIVE) -
The framework’s control groups, controls, and requirements are locked, and you can enable the framework in any project in the environment.
The lifecycle of a custom framework has these steps:
-
Create the framework (
CreateFramework). It starts in thePENDINGstatus. -
Add control groups (
CreateControlGroup) and controls (CreateControl). -
Publish the framework (
PublishFramework). Its status changes toACTIVE. -
Enable the framework in a project (
EnableFramework). AWS Assurance starts assessing its controls.
Publishing can’t be undone. After you publish a framework version, you can’t change its control groups or controls. Calls to CreateControlGroup, UpdateControlGroup, DeleteControlGroup, CreateControl, UpdateControl, and DeleteControl that would change that version fail with a ConflictException. For delete retries, see Delete a custom framework. You can still change the title and description of a published framework with UpdateFramework. To change its controls, create a new version. For more information, see Create a new version of a custom framework.
Create a custom framework in the web application
In the AWS Assurance web application, you can build a framework by hand, or upload a framework document and have AWS Assurance extract its control groups and controls into a draft framework.
If you build a framework by hand in the web application, its control groups and controls aren’t saved until you publish the framework. If you leave the page before you publish, the web application discards them. To keep work in progress as a draft, build the framework from a document, or use the API.
To create a custom framework
-
In the web application, choose Create, and then choose Create a new framework.
-
For Framework name, enter a name for the framework. You can also enter a description.
-
(Optional) To have AWS Assurance build the framework for you, upload a framework document. You can drop a PDF, DOCX, JSON, CSV, or XLSX file on the upload area. For instructions on building a framework from a document, see Build a custom framework from a document.
-
Choose Continue.
-
Add or review control groups and controls. For each control, enter a title, a description, and its requirements, and choose how the control is evaluated. For Automated scan and Hybrid controls, choose at least one control intent. For the list, see Control intents reference.
-
Choose one of the following:
-
Publish – Publishes the framework so that you can enable it in any project.
-
Publish & Enable – Publishes the framework and enables it in your current project.
-
Create a custom framework with the AWS CLI
The following AWS Command Line Interface (AWS CLI) example creates a custom framework, adds a control group and a control, publishes the framework, and then enables it in a project. Replace the placeholder values with your own.
-
To create the framework, run the following AWS CLI command. The framework name can’t start with
AWS:, which is reserved for managed frameworks. The version is a string that you choose.aws assurance create-framework \ --environment-arn arn:aws:assurance:<region>:<account-id>:environment/<environment-id> \ --framework example-corp-security-policy \ --framework-version 1.0 \ --title "Example Corp Security Policy" \ --description "Internal security controls for Example Corp production workloads."The response returns the framework with the type
CUSTOMand the statusPENDING. -
To create a control group, run the following AWS CLI command.
aws assurance create-control-group \ --environment-arn arn:aws:assurance:<region>:<account-id>:environment/<environment-id> \ --framework example-corp-security-policy \ --framework-version 1.0 \ --control-id DATA \ --title "Data protection" \ --display-order 1 -
To create a control in the group, run the following AWS CLI command. The
--parent-control-idvalue is the ID of the control group.aws assurance create-control \ --environment-arn arn:aws:assurance:<region>:<account-id>:environment/<environment-id> \ --framework example-corp-security-policy \ --framework-version 1.0 \ --control-id DATA-1 \ --parent-control-id DATA \ --title "Encrypt stored data" \ --description "Data at rest is encrypted for every storage resource." \ --requirements '[{"id":"DATA-1-R1","description":"Storage resources have encryption at rest enabled."}]' \ --control-intents storageEncryptionConfiguration \ --workflow-type automated-scan \ --display-order 1 -
To publish the framework, run the following AWS CLI command. The framework must contain at least one control.
aws assurance publish-framework \ --environment-arn arn:aws:assurance:<region>:<account-id>:environment/<environment-id> \ --framework example-corp-security-policy \ --framework-version 1.0The response returns the framework with the status
ACTIVE. -
To enable the framework in a project, run the following AWS CLI command.
aws assurance enable-framework \ --environment-arn arn:aws:assurance:<region>:<account-id>:environment/<environment-id> \ --framework example-corp-security-policy \ --framework-version 1.0 \ --project my-projectIf you omit
--framework-version, AWS Assurance enables the latest published version of the framework.AWS Assurance evaluates
automated-scanandhybridcontrols against the current inventory of the project’s in-scope resources.
To review the framework, call GetFramework. To review its controls, call ListControlGroups. Then call ListControls for each control group, and pass the group’s controlId as controlGroupId. ListControls returns only the controls in that group. Both operations are paginated, so repeat each call with the returned nextToken until no token is returned. To get the requirements and control intents of a control, call GetControl or BatchGetControl. To list only custom frameworks, call ListFrameworks with the type CUSTOM.
Authoring custom controls
The following rules apply when you create or update control groups, controls, and requirements.
Control and control group IDs
-
An ID must start with a letter or a digit. It can contain letters, digits, periods (
.), underscores (_), hyphens (-), and parentheses, for exampleAC-2(1). -
An ID can be up to 240 characters long.
-
A new ID can’t contain lowercase letters. Use
DATA-1, notdata-1. -
An ID must differ by more than case from every other control and control group ID in the framework version.
-
A control can’t have the same ID as a control group, and a control group can’t have the same ID as a control.
You can’t change the ID of a control or a control group after you create it, in the web application or with the API. Findings, assessment results, remediation tasks, and comments refer to a control by its ID. UpdateControl and UpdateControlGroup use the ID only to identify the item to update.
To change an ID in a published framework, create a new version of the framework. For more information, see Create a new version of a custom framework. To correct an ID in a draft framework, see Correct an ID in a draft framework.
To move a control to a different control group, call UpdateControl with a new parentControlId. You can’t remove a control from its group.
Correct an ID in a draft framework
Because you can’t edit an ID, you correct it by replacing the control or control group. Use the following steps to correct an ID in a draft framework:
To correct a control or control group ID in a draft framework
-
In the web application, open the draft framework.
-
Delete the control or control group. In a saved draft, deleting a control group also deletes its controls.
-
Create the control or control group again with the correct ID.
If the framework version already uses that ID, the web application marks the ID as taken.
CreateControlandCreateControlGroupfail with aConflictException.
The control or control group now has the correct ID. If you deleted a control group, add its controls again.
Requirements
Each requirement has an ID and a description. AWS Assurance stores each requirement ID in the form <controlId>-R<n>, where <n> is a number from 1 to 9999 without leading zeros. For the control DATA-1, you can send any of the following forms, and AWS Assurance stores all of them as DATA-1-R1:
-
DATA-1-R1 -
DATA-1.R1 -
R1
The R can be uppercase or lowercase, so r1 and DATA-1.r1 are also accepted. AWS Assurance rejects other forms, and it rejects two requirements of one control that resolve to the same ID. When you update a control, an ID that the control already stores is kept as it is. Each requirement must have a description that isn’t blank.
Keep requirement IDs stable after a control has been assessed, because findings, assessment results, and remediation tasks refer to them. When you call UpdateControl with a requirements list, the list replaces all of the control’s existing requirements. To leave the requirements unchanged, omit the list.
Field limits
The following table lists the limits for the fields of custom frameworks, control groups, controls, and requirements.
| Field | Limit |
|---|---|
|
Framework name |
256 characters |
|
Framework version |
64 characters |
|
Framework title |
256 characters |
|
Framework description |
1,024 characters |
|
Control or control group ID |
240 characters |
|
Control or control group title |
512 characters |
|
Control or control group description |
4,096 characters |
|
Requirements for each control |
100 |
|
Requirement ID |
256 characters |
|
Requirement description |
4,096 characters |
|
Total requirement text for each control |
300,000 bytes |
|
Control intents for each control |
20 |
A framework name must start with a letter or a digit, and can contain letters, digits, periods (.), underscores (
), and hyphens (-).
How AWS Assurance evaluates custom controls
The workflow type of a control determines how AWS Assurance evaluates it. The workflow types match the control types of managed frameworks. For more information, see Control types.
| Workflow type | Web application label | How AWS Assurance evaluates the control |
|---|---|---|
|
|
Automated scan |
AWS Assurance scores the control entirely by scanning your AWS resources against its control intents. You don’t upload anything. The control needs at least one control intent, and its intents must cover every requirement. |
|
|
Hybrid |
A scan answers the requirements that it can, and documents that you upload answer the rest. The control needs control intents for its technical requirements, and evidence for the rest. |
|
|
Document |
No scan runs. AWS Assurance scores the control from documents that you upload, such as policies, approvals, and records. AWS Assurance ignores control intents for this workflow type. |
A control intent is a technical category, such as storageEncryptionConfiguration or keyRotationConfiguration, that tells AWS Assurance which resources to scan and what to check. When you choose control intents in the web application, it lists the intents that AWS Assurance can scan, with the name and a description of each. If you call the API, specify each intent by its exact name. Intent names are case sensitive, and AWS Assurance rejects an intent that it can’t scan. For the list of control intents and when to use each one, see Control intents reference.
If you don’t specify a workflow type when you create a control, AWS Assurance uses automated-scan for a control with at least one control intent, and document for a control without control intents. The automated-scan and hybrid workflow types require at least one control intent.
AWS Assurance assesses the controls of a custom framework only after you publish the framework and enable it in a project. For more information about assessments and the tasks that they create, see Assessments and Remediation tasks. For more information about uploading documents, see Evidence management.
Update a custom framework
You can update a custom framework in the following ways:
-
Title and description – Call
UpdateFramework. You can change the title and description of a framework in either status. You can’t change the name or the version. -
Control groups and controls of a draft – Call
UpdateControlGrouporUpdateControl. Only the fields that you supply change. -
Control groups and controls of a published framework – Create a new version of the framework.
You can’t update a managed framework.
Create a new version of a custom framework
A framework version is identified by the framework name and the version string, for example example-corp-security-policy version 1.0. To change the controls of a published framework, create a new version with the same name.
To create a new version in the web application
-
Open the published framework.
-
Choose Actions, and then choose Create new version.
-
For New version, enter the version string.
-
Choose Create and edit.
The web application copies the control groups, controls, and requirements of the published version into a new draft version. Edit the draft, and then publish it. The earlier version stays published and unchanged, and it keeps its assessment results and tasks. The new version starts unassessed.
To create a new version with the AWS CLI
Call create-framework with the same --framework value and a new --framework-version value. A version that you create with the API starts as an empty draft. Add its control groups and controls, and then publish it.
You can enable more than one version of a framework in a project. AWS Assurance assesses each version independently. To move a project to a new version, enable the new version, and then disable the earlier version. Each version counts toward the quota of custom frameworks for each environment.
Delete a custom framework
You can delete a custom framework version when it isn’t enabled in any project of the environment. If the framework is enabled in a project, DeleteFramework fails with a ConflictException. Disable the framework in every project first. You can’t delete a managed framework.
What DeleteFramework deletes depends on the status of the framework:
-
Published framework (
ACTIVE) – AWS Assurance removes the framework from the API and the web application right away, and then deletes its control groups and controls in the background. If the request fails, run it again until it succeeds. To confirm the deletion, check that the framework no longer appears in theListFrameworksresponse or in the web application. The framework stops counting toward your custom framework quota when the background deletion finishes. -
Draft framework (
PENDING) – The framework must be empty. Delete its controls (DeleteControl), and then its control groups (DeleteControlGroup), before you delete the framework. Otherwise, the request fails with aConflictException. A control group must be empty before you can delete it.
Deleting a framework also deletes its remaining assessment history. Its assessment results and tasks are already gone, because disabling a framework in a project deletes them. Export any reports that you need before you disable the framework.
To delete a custom framework in the web application
-
Open the framework.
-
Choose Actions, and then choose Delete framework.
-
Confirm the deletion.
For a draft, the web application removes the control groups and controls for you before it deletes the framework. If the web application lists projects that block the deletion, disable the framework in those projects first.
To delete a custom framework with the AWS CLI, run the following command.
aws assurance delete-framework \ --environment-arn arn:aws:assurance:<region>:<account-id>:environment/<environment-id> \ --framework example-corp-security-policy \ --framework-version 1.0
DeleteFramework is idempotent. Deleting a framework that no longer exists succeeds.
DeleteControlGroup and DeleteControl are also idempotent. Deleting a control group or control that no longer exists succeeds, even in a published framework. Deleting one that still exists in a published framework fails with a ConflictException.
Build a custom framework from a document
AWS Assurance can build a custom framework from a framework document that you provide, such as a published standard or your internal policy. When you upload a document on the Create new custom framework page, AWS Assurance reads the document, creates a draft framework, and adds the control groups and controls that it extracts. The control groups and controls appear on the page as AWS Assurance creates them.
Importing a long document can take up to an hour. You can leave the page while the import runs. The import continues, and the page picks it up again when you return. You can’t publish the framework while the import is still running.
When you import a document, the import uses the control and control group IDs in your document. It saves each ID in the draft when it creates the item, so you can’t edit an extracted ID. When the import finishes, review the extracted controls and edit them as needed, and then publish the framework. To correct an extracted ID, see Correct an ID in a draft framework.
If you don’t want to keep the draft, choose Discard draft. You can’t start another import under the same name until you discard the draft from the earlier import.
You can also ask the chat agent to create, update, publish, and delete custom frameworks, control groups, and controls. For more information, see Chat agent.
Permissions for custom frameworks
Each custom framework operation has a matching IAM action in the assurance service prefix, for example assurance:CreateFramework, assurance:CreateControlGroup, assurance:CreateControl, and assurance:PublishFramework. To enable a framework in a project, you also need assurance:EnableFramework. For more information, see Identity and access management for AWS Assurance.
Quotas for custom frameworks
You can have up to 50 custom frameworks in each environment. Each version counts separately, so a framework with three versions uses three. If the environment is at the quota, CreateFramework fails with a ValidationException. Delete versions that you no longer need before you create another one. For all quotas, including the API rate quotas for the custom framework operations, see Quotas for AWS Assurance.