Skip to main content

delivery_sources

Creates, updates, deletes or gets a delivery_source resource or lists delivery_sources in a region

Overview

Namedelivery_sources
TypeResource
DescriptionA delivery source is an AWS resource that sends logs to an AWS destination. The destination can be CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.
Only some AWS services support being configured as a delivery source. These services are listed as Supported [V2 Permissions] in the table at [Enabling logging from AWS services](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html).
Idaws.logs.delivery_sources

Fields

NameDatatypeDescription
namestringThe unique name of the Log source.
arnstringThe Amazon Resource Name (ARN) that uniquely identifies this delivery source.
resource_arnsarrayThis array contains the ARN of the AWS resource that sends logs and is represented by this delivery source. Currently, only one ARN can be in the array.
resource_arnstringThe ARN of the resource that will be sending the logs.
servicestringThe AWS service that is sending logs.
log_typestringThe type of logs being delivered. Only mandatory when the resourceArn could match more than one. In such a case, the error message will contain all the possible options.
tagsarrayThe tags that have been assigned to this delivery source.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all delivery_sources in a region.

SELECT
region,
name,
arn,
resource_arns,
resource_arn,
service,
log_type,
tags
FROM aws.logs.delivery_sources
WHERE region = 'us-east-1';

Gets all properties from an individual delivery_source.

SELECT
region,
name,
arn,
resource_arns,
resource_arn,
service,
log_type,
tags
FROM aws.logs.delivery_sources
WHERE region = 'us-east-1' AND data__Identifier = '<Name>';

INSERT example

Use the following StackQL query and manifest file to create a new delivery_source resource, using stack-deploy.

/*+ create */
INSERT INTO aws.logs.delivery_sources (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.logs.delivery_sources
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';

Permissions

To operate on the delivery_sources resource, the following permissions are required:

Create

logs:PutDeliverySource,
logs:GetDeliverySource,
logs:ListTagsForResource,
logs:TagResource,
logs:AllowVendedLogDeliveryForResource,
codewhisperer:AllowVendedLogDeliveryForResource,
autoloop:AllowVendedLogDeliveryForResource,
workmail:AllowVendedLogDeliveryForResource

Read

logs:GetDeliverySource,
logs:ListTagsForResource

Update

logs:PutDeliverySource,
logs:GetDeliverySource,
logs:ListTagsForResource,
logs:TagResource,
logs:UntagResource

Delete

logs:DeleteDeliverySource

List

logs:DescribeDeliverySources