{"id":19437891,"url":"https://github.com/architect/plugin-external-tables","last_synced_at":"2025-07-29T23:32:40.102Z","repository":{"id":43845994,"uuid":"411896252","full_name":"architect/plugin-external-tables","owner":"architect","description":"Enable access to external DynamoDB tables from other Architect projects, legacy Architect projects, and non-Architect projects","archived":false,"fork":false,"pushed_at":"2022-02-16T04:47:47.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-19T14:11:12.180Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/architect.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":".github/contributing.md","funding":null,"license":null,"code_of_conduct":".github/code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-30T02:27:09.000Z","updated_at":"2024-09-30T00:12:32.000Z","dependencies_parsed_at":"2022-09-22T14:40:52.147Z","dependency_job_id":null,"html_url":"https://github.com/architect/plugin-external-tables","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/architect/plugin-external-tables","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Fplugin-external-tables","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Fplugin-external-tables/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Fplugin-external-tables/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Fplugin-external-tables/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/architect","download_url":"https://codeload.github.com/architect/plugin-external-tables/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Fplugin-external-tables/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267780014,"owners_count":24143201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T15:16:11.571Z","updated_at":"2025-07-29T23:32:40.025Z","avatar_url":"https://github.com/architect.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[\u003cimg src=\"https://assets.arc.codes/architect-logo-500b@2x.png\" width=500\u003e](https://www.npmjs.com/package/@architect/plugin-external-tables)\n\n## [`@architect/plugin-external-tables`](https://www.npmjs.com/package/@architect/plugin-external-tables)\n\n\u003e Enable access to external DynamoDB tables from other Architect projects, legacy Architect projects, and non-Architect projects\n\n[![GitHub CI status](https://github.com/architect/plugin-external-tables/workflows/Node%20CI/badge.svg)](https://github.com/architect/plugin-external-tables/actions?query=workflow%3A%22Node+CI%22)\n\n\n### Install\n\n`npm i @architect/plugin-external-tables`\n\nAdd this line to your Architect project manifest:\n\n```arc\n# app.arc\n@plugins\narchitect/plugin-external-tables\n```\n\nThen follow the directions below for `@external-tables`.\n\n\u003e Note: this plugin currently only supports enabling access to tables in the same region. For example: if your app is in `us-west-1`, this plugin will not enable access to external tables in `us-east-1`.\n\n---\n\n### `@external-tables`\n\nThe `@external-tables` pragma enables access to DynamoDB tables managed by current and legacy versions of Architect, and an arbitrary number of physical DynamoDB table names. Usage for each:\n\n- **Other Architect tables**\n  - Each entry is a named list, where the name is the `@app` name of the external Architect app, and the list is of tables to which you'd like to provide access\n  - In the [example below](#examples), resources in the `my-app` Architect app would get access three external tables:\n    - The `analytics` + `data` tables from the app named `an-arc-app`, and\n    - The `usage` table from the app named `another-arc-app `\n- **Legacy Architect tables**\n  - Each entry is a string; legacy Arc tables follow convention-based naming, and require a special variable, like so: `old-app-$arc_stage-users`; this breaks down as follows:\n    - `old-app` - the `@app` name of your legacy Arc app\n    - `$arc_stage` - a special string used by this plugin to identify the deployment stage (`staging` or `production`) of the table\n    - `users` - the `@tables` name of your legacy table\n- **Physical table names**\n  - Each entry is a string; any arbitrary table name can be used here, e.g. `user-data`\n  - Note: physical table names are not to be confused with ARNs; DynamoDB ARNs cannot be used by this plugin\n\n\n### Table uniqueness\n\nAlthough tables may have various unique physical names, **each resolved logical table name must be unique across `@tables`, `@arc-tables`, and `@other-tables` when using this plugin**.\n\nIf a conflict is found, this plugin will error. For example, you may have the following literal table names:\n\n- `MyAppStaging-UsersTable-ABC123` - a table named `users` managed by the Architect app named `my-app`\n- `AnArcAppProduction-UsersTable-DEF456` - a table named `users` managed by another Architect app named `an-arc-app`\n- `another-arc-app-staging-users` - a table named `users` originally created by a legacy Architect app named `another-arc-app`\n- `users` - a table just named `users` created outside of Architect\n\nBecause of how Architect manages automatic service discovery for tables with `@architect/functions` all four of these tables would be in conflict with the logical table name `users` (e.g. `arc.tables().users.get()`).\n\n\n### Examples\n\nAn example providing an Architect app access to the internal table named `products`, and five external tables: `analytics`, `data`, `usage`, `users`, and `user-data`.\n\n```arc\n@app\nmy-app\n\n@tables                   # tables managed by this Architect app\nproducts\n  id *String\n\n@external-tables          # tables managed by other Arc apps in the same region\nan-arc-app                # app name\n  analytics               # table names...\n  data\nanother-arc-app           # another app\n  usage\nold-app-$arc_stage-users  # legacy Arc table\nuser-data                 # DynamoDB table not created/managed by Arc\n```\n\nThis example **would not work** due to [table name uniqueness conflicts](#table-uniqueness) enumerated above:\n\n```arc\n@app\nbroken-tables\n\n@tables                       # tables managed by this Architect app\nproducts\n  id *String\n\n@external-tables\nan-arc-app\n  products                    # conflicts with @tables products\nanother-arc-app\n  products                    # conflicts with @tables products\nold-app-$arc_stage-products   # conflicts with @tables products\nproducts                      # conflicts with @tables products\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchitect%2Fplugin-external-tables","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchitect%2Fplugin-external-tables","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchitect%2Fplugin-external-tables/lists"}