Prerequisites for creating views
-
To create views in Data Catalog, you must register the underlying Amazon S3 data locations of the reference tables with Lake Formation. For details on registering data with Lake Formation, see Adding an Amazon S3 location to your data lake.
-
Only IAM roles can create Data Catalog views. Other IAM identities can't create Data Catalog views.
-
The IAM role that defines the view must have the following permissions:
Lake Formation
SELECTpermission with theGrantableoption on all reference tables, all columns included.Lake Formation
CREATE_TABLEpermission on the target database where views are being created.A trust policy for the Lake Formation and AWS Glue services to assume the role.
-
The iam:PassRole permission for AWS Glue and Lake Formation.
-
AWS Glue and Lake Formation permissions.
-
You can't create views in a database that has
SuperorALLpermission granted to theIAMAllowedPrincipalsgroup. You can either revoke theSuperpermission for theIAMAllowedPrincipalsgroup on a database, see Step 4: Switch your data stores to the Lake Formation permissions model, or create a new database with the Use only IAM access control for new tables in this database box unchecked under Default permissions for newly created tables.