How to get ARN for Lake Formation Table?

0

I'm trying to use table ARN in aws lakeformation describe-resource . However, when building ARN like recommended

table_arn = f"arn:aws:lakeformation:{region}:{account_id}:table/{database_name}/{table_name}"

I'm, getting the following error:

An error occurred (InvalidInputException) when calling the DescribeResource operation: Un-supported resource arn format

What is wrong with ARN formatting I'm using?

asked a year ago691 views
1 Answer
-1

To get the ARN (Amazon Resource Name) for a Lake Formation table in AWS, you can follow these steps:

  1. Open the AWS Management Console and navigate to the Lake Formation service.
  2. In the Lake Formation console, select "Tables" from the left-hand menu.
  3. Locate the table for which you want to retrieve the ARN and click on its name.
  4. On the table details page, you should find the ARN listed under the "Details" section or a similar heading.
  5. Alternatively, you can use the AWS Command Line Interface (CLI) to retrieve the ARN. Open a terminal or command prompt and run the following command, replacing "table-name" with the name of your Lake Formation table:

aws lakeformation describe-table --database-name your-database-name --table-name table-name Look for the "TableArn" attribute in the command output to find the ARN of the specified table.

The ARN will be in the following format: arn:aws:lakformation:<region>:<account-id>:table/<database-name>/<table-name>. It uniquely identifies the Lake Formation table within your AWS account and can be used for various purposes, such as granting permissions, referencing the table in other AWS services, or integrating with third-party tools.

Let me know if this helps.

answered a year ago
  • Hi, thank you for a prompt answer, but unfortunately neither of solution works : 1.) There is no ARN in "Detail" section. 2.) There is no describe-table operation : aws lakeformation describe-table returns :

    aws lakeformation describe-table --database-name test_lakeformation --table-name test_table
    
    usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
    To see help text, you can run:
    
      aws help
      aws <command> help
      aws <command> <subcommand> help
    
    aws: error: argument operation: Invalid choice, valid choices are:
    
    add-lf-tags-to-resource                  | assume-decorated-role-with-saml         
    batch-grant-permissions                  | batch-revoke-permissions  
    
  • Could you please post the below query answer?

    1. aws lakeformation describe-table
    2. aws lakeformation
    3. aws lakeformation describe-table --database-name test_lakeformation
  • aws lakeformation describe-table
    
    usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
    To see help text, you can run:
    
      aws help
      aws <command> help
      aws <command> <subcommand> help
    
    aws: error: argument operation: Invalid choice, valid choices are:
    
    add-lf-tags-to-resource                  | assume-decorated-role-with-saml         
    batch-grant-permissions                  | batch-revoke-permissions                
    cancel-transaction                       | commit-transaction                      
    create-data-cells-filter                 | create-lf-tag                           
    delete-data-cells-filter                 | delete-lf-tag                           
    delete-objects-on-cancel                 | deregister-resource                     
    describe-resource                        | describe-transaction                    
    extend-transaction                       | get-data-lake-settings                  
    get-effective-permissions-for-path       | get-lf-tag                              
    get-query-state                          | get-query-statistics                    
    get-resource-lf-tags                     | get-table-objects                       
    get-temporary-glue-partition-credentials | get-temporary-glue-table-credentials    
    get-work-unit-results                    | get-work-units                          
    grant-permissions                        | list-data-cells-filter                  
    list-lf-tags                             |
    
  • aws lakeformation
    
    usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
    To see help text, you can run:
    
      aws help
      aws <command> help
      aws <command> <subcommand> help
    
    aws: error: the following arguments are required: operation
    

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions