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 | aws.shield.drt_accesses |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | RoleArn, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all drt_accesses
in a region.
SELECT
region,
account_id,
log_bucket_list,
role_arn
FROM aws.shield.drt_accesses
;
Gets all properties from an individual drt_access
.
SELECT
region,
account_id,
log_bucket_list,
role_arn
FROM aws.shield.drt_accesses
WHERE data__Identifier = '<AccountId>';
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 aws.shield.drt_accesses (
RoleArn,
region
)
SELECT
'{{ RoleArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.shield.drt_accesses (
LogBucketList,
RoleArn,
region
)
SELECT
'{{ LogBucketList }}',
'{{ RoleArn }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: drt_access
props:
- name: LogBucketList
value:
- '{{ LogBucketList[0] }}'
- name: RoleArn
value: '{{ RoleArn }}'
DELETE
example
/*+ delete */
DELETE FROM aws.shield.drt_accesses
WHERE data__Identifier = '<AccountId>'
AND region = 'us-east-1';
Permissions
To operate on the drt_accesses
resource, the following permissions are required:
Create
shield:DescribeDRTAccess,
shield:AssociateDRTLogBucket,
shield:AssociateDRTRole,
iam:PassRole,
iam:GetRole,
iam:ListAttachedRolePolicies,
s3:GetBucketPolicy,
s3:PutBucketPolicy
Delete
shield:DescribeDRTAccess,
shield:DisassociateDRTLogBucket,
shield:DisassociateDRTRole,
iam:PassRole,
iam:GetRole,
iam:ListAttachedRolePolicies,
s3:GetBucketPolicy,
s3:PutBucketPolicy,
s3:DeleteBucketPolicy
Read
shield:DescribeDRTAccess
Update
shield:DescribeDRTAccess,
shield:AssociateDRTLogBucket,
shield:AssociateDRTRole,
shield:DisassociateDRTLogBucket,
shield:DisassociateDRTRole,
iam:PassRole,
iam:GetRole,
iam:ListAttachedRolePolicies,
s3:GetBucketPolicy,
s3:PutBucketPolicy,
s3:DeleteBucketPolicy
List
shield:DescribeDRTAccess