Create Stream Table

In this section, you will create a new table on Lake Formation that is going to show the real-time data that comes from the Firehose delivery stream created in the previous section.
  1. Go to Services and search for Lake Formation.
  2. Click on Crawlers section on the left-hand side.
  3. This is going to open a new Glue Crawler tab, select Add Crawler.
  4. Add tpc_sales_events as the crawler name.
  5. Select the Data stores Option.
  6. Configure the Data Store as follows:
    • Choose a data store: S3
    • Crawl Data in: Specified path in my account
    • Include Path: Select the sales-event folder in your data lake bucket s3://lf-data-lake-bucket-youraaccountnumber/dl_tpc_sales_event
    and then select Next.
  7. Select No on Add another data store.
  8. Configure the IAM role as follows:
    • Select Choose an existing IAM role
    • Select the LF-GlueServiceRole role
    and then select Next.
  9. Select Run on demand.
  10. Configure the crawler's output, select tpc as the database and click Next.
  11. Select Finish.
  12. Click on Run it now?
  13. This process takes 4 minutes, wait until you see the Completed status and that 1 table was created and then close the browser Tab.
  14. Go back to the Lake Formation console, click on Data permissions section on the left-hand side.
  15. Then click on Grant button.
  16. On the window that pops up, fill out IAM users and roles as lf-developer, choose tpc for the database and select dl_tpc_sales_event as the table with Select as the only Table permission.

    Leave the Grantable permissions unselected and click on the Grant button.
Now, you are going to query the real-time data in Amazon Athena using different users.