AWS Lake Formation: CLI grant_permissions : Unknown parameter in Resource.Table: "TableWildcard"

1.1k views Asked by At

We are attempting to grant permissions (using the AWS CLI) for a user to have SELECT permissions on all tables in a database in AWS Lake Formation.

Based on documentation; Lake Formation Permissions Reference and Granting Table Permissions

We attempted the following command:

aws lakeformation grant-permissions --principal DataLakePrincipalIdentifier=arn:aws:iam::000000000000:user/spongebob --permissions "SELECT" --permissions-with-grant-option "SELECT" --resource '{ ""Table"": { ""DatabaseName"": ""somedatabase"", ""TableWildcard"": {} } }'

Which returned the following error:

Parameter validation failed: Missing required parameter in Resource.Table: "Name" Unknown parameter in Resource.Table: "TableWildcard", must be one of: DatabaseName, Name

We tried some variations of the command (the documentation does say this needs to be an empty dictionary though), and we've come to the conclusion that it must be something to do with the API version that we are calling when executing the command.

Would anyone be able to confirm whether this is an API version issue, or if there is something missing from the documentation (linked above) we have missed.

Cheers

1

There are 1 answers

3
amsh On BEST ANSWER

It's definitely a version mismatch. The same error was faced due to older boto3 version in lambda.

Update the aws cli and try again:

sudo pip3 install awscli --force-reinstall --upgrade