subscribers
Creates, updates, deletes, gets or lists a subscribers resource.
Overview
| Name | subscribers |
| Type | Resource |
| Id | aws.securitylake.subscribers |
Fields
The following fields are returned by SELECT queries:
- get_subscriber
- list_subscribers
| Name | Datatype | Description |
|---|---|---|
access_types | array | You can choose to notify subscribers of new objects with an Amazon Simple Queue Service (Amazon SQS) queue or through messaging to an HTTPS endpoint provided by the subscriber. Subscribers can consume data by directly querying Lake Formation tables in your Amazon S3 bucket through services like Amazon Athena. This subscription type is defined as LAKEFORMATION. |
created_at | string (date-time) | The date and time when the subscriber was created. |
resource_share_arn | string | The Amazon Resource Name (ARN) which uniquely defines the Amazon Web Services RAM resource share. Before accepting the RAM resource share invitation, you can view details related to the RAM resource share. This field is available only for Lake Formation subscribers created after March 8, 2023. |
resource_share_name | string | The name of the resource share. (pattern: <code>^LakeFormation(?:-V[0-9]+)-([a-zA-Z0-9]+)-([\\w-_:/.@=+]*)$</code>) |
role_arn | string | The Amazon Resource Name (ARN) specifying the role of the subscriber. (pattern: <code>^arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+$</code>) |
s_3_bucket_arn | string | The ARN for the Amazon S3 bucket. |
sources | array | Amazon Security Lake supports log and event collection for natively supported Amazon Web Services services. For more information, see the Amazon Security Lake User Guide. |
subscriber_arn | string | The subscriber ARN of the Amazon Security Lake subscriber account. (pattern: <code>^arn:(aws|aws-us-gov|aws-cn):securitylake:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9_/.-]{0,127}$</code>) |
subscriber_description | string | The subscriber descriptions for a subscriber account. The description for a subscriber includes subscriberName, accountID, externalID, and subscriberId. (pattern: <code>^[\\w-_:/.@=+]*$</code>) |
subscriber_endpoint | string | The subscriber endpoint to which exception messages are posted. (pattern: <code>^[\\w-_:/.@=+]*$</code>) |
subscriber_id | string | The subscriber ID of the Amazon Security Lake subscriber account. (pattern: <code>^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$</code>) |
subscriber_identity | object | The Amazon Web Services identity. |
subscriber_name | string | The name of your Amazon Security Lake subscriber account. (pattern: <code>^[\\w-_:/.@=+]*$</code>) |
subscriber_status | string | The subscriber status of the Amazon Security Lake subscriber account. (ACTIVE, DEACTIVATED, PENDING, READY) |
updated_at | string (date-time) | The date and time when the subscriber was last updated. |
| Name | Datatype | Description |
|---|---|---|
access_types | array | You can choose to notify subscribers of new objects with an Amazon Simple Queue Service (Amazon SQS) queue or through messaging to an HTTPS endpoint provided by the subscriber. Subscribers can consume data by directly querying Lake Formation tables in your Amazon S3 bucket through services like Amazon Athena. This subscription type is defined as LAKEFORMATION. |
created_at | string (date-time) | The date and time when the subscriber was created. |
resource_share_arn | string | The Amazon Resource Name (ARN) which uniquely defines the Amazon Web Services RAM resource share. Before accepting the RAM resource share invitation, you can view details related to the RAM resource share. This field is available only for Lake Formation subscribers created after March 8, 2023. |
resource_share_name | string | The name of the resource share. (pattern: <code>^LakeFormation(?:-V[0-9]+)-([a-zA-Z0-9]+)-([\\w-_:/.@=+]*)$</code>) |
role_arn | string | The Amazon Resource Name (ARN) specifying the role of the subscriber. (pattern: <code>^arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+$</code>) |
s_3_bucket_arn | string | The ARN for the Amazon S3 bucket. |
sources | array | Amazon Security Lake supports log and event collection for natively supported Amazon Web Services services. For more information, see the Amazon Security Lake User Guide. |
subscriber_arn | string | The subscriber ARN of the Amazon Security Lake subscriber account. (pattern: <code>^arn:(aws|aws-us-gov|aws-cn):securitylake:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9_/.-]{0,127}$</code>) |
subscriber_description | string | The subscriber descriptions for a subscriber account. The description for a subscriber includes subscriberName, accountID, externalID, and subscriberId. (pattern: <code>^[\\w-_:/.@=+]*$</code>) |
subscriber_endpoint | string | The subscriber endpoint to which exception messages are posted. (pattern: <code>^[\\w-_:/.@=+]*$</code>) |
subscriber_id | string | The subscriber ID of the Amazon Security Lake subscriber account. (pattern: <code>^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$</code>) |
subscriber_identity | object | The Amazon Web Services identity. |
subscriber_name | string | The name of your Amazon Security Lake subscriber account. (pattern: <code>^[\\w-_:/.@=+]*$</code>) |
subscriber_status | string | The subscriber status of the Amazon Security Lake subscriber account. (ACTIVE, DEACTIVATED, PENDING, READY) |
updated_at | string (date-time) | The date and time when the subscriber was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_subscriber | select | subscriber_id, region | Retrieves the subscription information for the specified subscription ID. You can get information about a specific subscriber. | |
list_subscribers | select | region | maxResults, nextToken | Lists all subscribers for the specific Amazon Security Lake account ID. You can retrieve a list of subscriptions associated with a specific organization or Amazon Web Services account. |
create_subscriber | insert | region, sources, subscriberIdentity, subscriberName | Creates a subscriber for accounts that are already enabled in Amazon Security Lake. You can create a subscriber with access to data in the current Amazon Web Services Region. | |
create_subscriber_notification | insert | subscriber_id, region, configuration | Notifies the subscriber when new data is written to the data lake for the sources that the subscriber consumes in Security Lake. You can create only one subscriber notification per subscriber. | |
update_subscriber_notification | update | subscriber_id, region, configuration | Updates an existing notification method for the subscription (SQS or HTTPs endpoint) or switches the notification subscription endpoint for a subscriber. | |
update_subscriber | update | subscriber_id, region | Updates an existing subscription for the given Amazon Security Lake account ID. You can update a subscriber by changing the sources that the subscriber consumes data from. | |
delete_subscriber | delete | subscriber_id, region | Deletes the subscription permission and all notification settings for accounts that are already enabled in Amazon Security Lake. When you run DeleteSubscriber, the subscriber will no longer consume data from Security Lake and the subscriber is removed. This operation deletes the subscriber and removes access to data in the current Amazon Web Services Region. | |
delete_subscriber_notification | exec | subscriber_id, region | Deletes the specified subscription notification in Amazon Security Lake for the organization you specify. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
subscriber_id | string | The ID of the Security Lake subscriber account. |
maxResults | integer | The maximum number of accounts for which the configuration is displayed. |
nextToken | string | If nextToken is returned, there are more results available. You can repeat the call using the returned token to retrieve the next page. |
SELECT examples
- get_subscriber
- list_subscribers
Retrieves the subscription information for the specified subscription ID. You can get information about a specific subscriber.
SELECT
access_types,
created_at,
resource_share_arn,
resource_share_name,
role_arn,
s_3_bucket_arn,
sources,
subscriber_arn,
subscriber_description,
subscriber_endpoint,
subscriber_id,
subscriber_identity,
subscriber_name,
subscriber_status,
updated_at
FROM aws.securitylake.subscribers
WHERE subscriber_id = '{{ subscriber_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists all subscribers for the specific Amazon Security Lake account ID. You can retrieve a list of subscriptions associated with a specific organization or Amazon Web Services account.
SELECT
access_types,
created_at,
resource_share_arn,
resource_share_name,
role_arn,
s_3_bucket_arn,
sources,
subscriber_arn,
subscriber_description,
subscriber_endpoint,
subscriber_id,
subscriber_identity,
subscriber_name,
subscriber_status,
updated_at
FROM aws.securitylake.subscribers
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_subscriber
- create_subscriber_notification
- Manifest
Creates a subscriber for accounts that are already enabled in Amazon Security Lake. You can create a subscriber with access to data in the current Amazon Web Services Region.
INSERT INTO aws.securitylake.subscribers (
accessTypes,
sources,
subscriberDescription,
subscriberIdentity,
subscriberName,
tags,
region
)
SELECT
'{{ accessTypes }}',
'{{ sources }}' /* required */,
'{{ subscriberDescription }}',
'{{ subscriberIdentity }}' /* required */,
'{{ subscriberName }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
subscriber
;
Notifies the subscriber when new data is written to the data lake for the sources that the subscriber consumes in Security Lake. You can create only one subscriber notification per subscriber.
INSERT INTO aws.securitylake.subscribers (
configuration,
subscriber_id,
region
)
SELECT
'{{ configuration }}' /* required */,
'{{ subscriber_id }}',
'{{ region }}'
RETURNING
subscriber_endpoint
;
# Description fields are for documentation purposes
- name: subscribers
props:
- name: region
value: "{{ region }}"
description: Required parameter for the subscribers resource.
- name: subscriber_id
value: "{{ subscriber_id }}"
description: Required parameter for the subscribers resource.
- name: accessTypes
value:
- "{{ accessTypes }}"
- name: sources
value:
- awsLogSource:
sourceName: "{{ sourceName }}"
sourceVersion: "{{ sourceVersion }}"
customLogSource:
attributes:
crawlerArn: "{{ crawlerArn }}"
databaseArn: "{{ databaseArn }}"
tableArn: "{{ tableArn }}"
provider:
location: "{{ location }}"
roleArn: "{{ roleArn }}"
sourceName: "{{ sourceName }}"
sourceVersion: "{{ sourceVersion }}"
- name: subscriberDescription
value: "{{ subscriberDescription }}"
- name: subscriberIdentity
description: |
The Amazon Web Services identity.
value:
externalId: "{{ externalId }}"
principal: "{{ principal }}"
- name: subscriberName
value: "{{ subscriberName }}"
- name: tags
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: configuration
description: |
Specify the configurations you want to use for subscriber notification to notify the subscriber when new data is written to the data lake for sources that the subscriber consumes in Security Lake.
value:
httpsNotificationConfiguration:
authorizationApiKeyName: "{{ authorizationApiKeyName }}"
authorizationApiKeyValue: "{{ authorizationApiKeyValue }}"
endpoint: "{{ endpoint }}"
httpMethod: "{{ httpMethod }}"
targetRoleArn: "{{ targetRoleArn }}"
sqsNotificationConfiguration: "{{ sqsNotificationConfiguration }}"
UPDATE examples
- update_subscriber_notification
- update_subscriber
Updates an existing notification method for the subscription (SQS or HTTPs endpoint) or switches the notification subscription endpoint for a subscriber.
UPDATE aws.securitylake.subscribers
SET
configuration = '{{ configuration }}'
WHERE
subscriber_id = '{{ subscriber_id }}' --required
AND region = '{{ region }}' --required
AND configuration = '{{ configuration }}' --required
RETURNING
subscriber_endpoint;
Updates an existing subscription for the given Amazon Security Lake account ID. You can update a subscriber by changing the sources that the subscriber consumes data from.
UPDATE aws.securitylake.subscribers
SET
sources = '{{ sources }}',
subscriberDescription = '{{ subscriberDescription }}',
subscriberIdentity = '{{ subscriberIdentity }}',
subscriberName = '{{ subscriberName }}'
WHERE
subscriber_id = '{{ subscriber_id }}' --required
AND region = '{{ region }}' --required
RETURNING
subscriber;
DELETE examples
- delete_subscriber
Deletes the subscription permission and all notification settings for accounts that are already enabled in Amazon Security Lake. When you run DeleteSubscriber, the subscriber will no longer consume data from Security Lake and the subscriber is removed. This operation deletes the subscriber and removes access to data in the current Amazon Web Services Region.
DELETE FROM aws.securitylake.subscribers
WHERE subscriber_id = '{{ subscriber_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- delete_subscriber_notification
Deletes the specified subscription notification in Amazon Security Lake for the organization you specify.
EXEC aws.securitylake.subscribers.delete_subscriber_notification
@subscriber_id='{{ subscriber_id }}' --required,
@region='{{ region }}' --required
;