Working with managed crawlers
When you turn on sync for a federated catalog, AWS Glue creates and runs a managed crawler that reads metadata from the source and writes it to the Data Catalog. You manage the crawler through the catalog. This topic describes what AWS Glue creates, how to run and monitor the crawler, and which operations aren't allowed on a managed crawler.
What AWS Glue creates
For each federated catalog that has sync turned on, AWS Glue creates one managed crawler for assets. If you turn on lineage sync, AWS Glue creates a second managed crawler for lineage. After AWS Glue provisions a crawler, the first crawl starts automatically. The following table describes the properties of the assets managed crawler.
| Property | Value |
|---|---|
| Name | catalog-sync-assets-, where
id is a system-generated hexadecimal
identifier. |
| Catalog | |
| Target | RestCatalogTargets with the catalog's connection. |
| Role | The IAM role from the SyncConfiguration. |
| Schedule | Set from RefreshIntervalMinutes on the catalog. Either a
24-hour interval (1440) or a 7-day interval
(10080). |
| Description | System-managed REST_CATALOG crawler of federated catalog
|
When lineage sync is turned on, the second managed crawler is named
catalog-sync-lineage-, where
idid is a system-generated hexadecimal identifier. Its target
is LineageTargets, and its description identifies it as a
LINEAGE crawler rather than a REST_CATALOG crawler.
Find the crawler name from the ARN
The GetCatalog operation returns the crawler Amazon Resource Name (ARN)
in ManagedCrawlerDetails. The crawler operations take the crawler name,
which is the part of the ARN after crawler/, not the full ARN. For example,
in the ARN
arn:aws:glue:,
the crawler name is region:account-id:crawler/catalog-sync-assets-idcatalog-sync-assets-.id
Run or stop a sync on demand
You can run a sync on demand instead of waiting for the next scheduled run, and you
can stop a run that's in progress. The StartCrawler and
StopCrawler operations are allowed on a managed crawler.
-
Start a run with the
start-crawlercommand.aws glue start-crawler --namecrawler-name -
Stop a run that's in progress with the
stop-crawlercommand.aws glue stop-crawler --namecrawler-name
View runs, metrics, and logs
You can review the run history, metrics, and logs of a managed crawler the same way you review a crawler you create.
-
List the crawler runs with the
list-crawlscommand.aws glue list-crawls --crawler-namecrawler-name -
Get the crawler metrics with the
get-crawler-metricscommand.aws glue get-crawler-metrics --crawler-name-listcrawler-name -
Read the crawler logs from the
/aws-glue/crawlerslog group in CloudWatch Logs. Each crawler writes to a log stream named after the crawler.aws logs get-log-events \ --log-group-name /aws-glue/crawlers \ --log-stream-namecrawler-name
Operations that aren't allowed on managed crawlers
A managed crawler doesn't allow the following operations. Each one returns an
InvalidInputException with HTTP status 400.
-
UpdateCrawler -
DeleteCrawler -
StartCrawlerSchedule -
StopCrawlerSchedule -
UpdateCrawlerSchedule
The error text names the operation you called, as in the following example.
System-managed crawlers cannot be modified through UpdateCrawler. Manage synchronization through the Glue Catalog APIs (UpdateCatalog or DeleteCatalog) instead.
To change the schedule, update RefreshIntervalMinutes on the catalog with
the UpdateCatalog operation. To remove the crawler, turn off sync or delete
the catalog with the DeleteCatalog operation. You can't create a managed
crawler yourself. Only AWS Glue creates the managed crawler for a federated catalog.