drt_accesses
Creates, updates, deletes or gets a drt_access resource or lists drt_accesses in a region
Overview
| Name | drt_accesses |
| Type | Resource |
| Description | Config the role and list of Amazon S3 log buckets used by the Shield Response Team (SRT) to access your AWS account while assisting with attack mitigation. |
| Id | awscc.shield.drt_accesses |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
account_id | string | |
log_bucket_list | array | Authorizes the Shield Response Team (SRT) to access the specified Amazon S3 bucket containing log data such as Application Load Balancer access logs, CloudFront logs, or logs from third party sources. You can associate up to 10 Amazon S3 buckets with your subscription. |
role_arn | string | Authorizes the Shield Response Team (SRT) using the specified role, to access your AWS account to assist with DDoS attack mitigation during potential attacks. This enables the SRT to inspect your AWS WAF configuration and create or update AWS WAF rules and web ACLs. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
account_id | string | |
region | string | AWS region. |
For more information, see AWS::Shield::DRTAccess.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | drt_accesses | INSERT | RoleArn, region |
delete_resource | drt_accesses | DELETE | Identifier, region |
update_resource | drt_accesses | UPDATE | Identifier, PatchDocument, region |
list_resources | drt_accesses_list_only | SELECT | region |
get_resource | drt_accesses | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual drt_access.
SELECT
region,
account_id,
log_bucket_list,
role_arn
FROM awscc.shield.drt_accesses
WHERE
region = 'us-east-1' AND
Identifier = '{{ account_id }}';
Lists all drt_accesses in a region.
SELECT
region,
account_id
FROM awscc.shield.drt_accesses_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new drt_access resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.shield.drt_accesses (
RoleArn,
region
)
SELECT
'{{ role_arn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.shield.drt_accesses (
LogBucketList,
RoleArn,
region
)
SELECT
'{{ log_bucket_list }}',
'{{ role_arn }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: drt_access
props:
- name: log_bucket_list
value:
- '{{ log_bucket_list[0] }}'
- name: role_arn
value: '{{ role_arn }}'
UPDATE example
Use the following StackQL query and manifest file to update a drt_access resource, using stack-deploy.
/*+ update */
UPDATE awscc.shield.drt_accesses
SET PatchDocument = string('{{ {
"LogBucketList": log_bucket_list,
"RoleArn": role_arn
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ account_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.shield.drt_accesses
WHERE
Identifier = '{{ account_id }}' AND
region = 'us-east-1';
Permissions
To operate on the drt_accesses resource, the following permissions are required:
- Create
- Delete
- Read
- Update
- List
shield:DescribeDRTAccess,
shield:AssociateDRTLogBucket,
shield:AssociateDRTRole,
iam:PassRole,
iam:GetRole,
iam:ListAttachedRolePolicies,
s3:GetBucketPolicy,
s3:PutBucketPolicy
shield:DescribeDRTAccess,
shield:DisassociateDRTLogBucket,
shield:DisassociateDRTRole,
iam:PassRole,
iam:GetRole,
iam:ListAttachedRolePolicies,
s3:GetBucketPolicy,
s3:PutBucketPolicy,
s3:DeleteBucketPolicy
shield:DescribeDRTAccess
shield:DescribeDRTAccess,
shield:AssociateDRTLogBucket,
shield:AssociateDRTRole,
shield:DisassociateDRTLogBucket,
shield:DisassociateDRTRole,
iam:PassRole,
iam:GetRole,
iam:ListAttachedRolePolicies,
s3:GetBucketPolicy,
s3:PutBucketPolicy,
s3:DeleteBucketPolicy
shield:DescribeDRTAccess