question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

expose amplify-meta.json to backend functions & apis

See original GitHub issue

Is your feature request related to a problem? Please describe. Multienv support generates new resource identifiers for resources like Cognito User Pools, DynamoDB table names, and ElasticSearch endpoints. This makes referencing those resources from backend functions (added via amplify add function or amplify add api) challenging (and in some cases impossible) with hardcoding per-environment configuration outside the context of Amplify.

Describe the solution you’d like

  • As part of the build process for Lambda functions, expose a copy of amplify-meta.json that the Lambda function can use to lookup desired resource identifiers.
  • DynamoDB table names created by the GraphQL transformer are not currently exposed in amplify-meta.json; add those, please.
  • No information about the ElasticSearch service provisioned by @searchable is currently included in amplify-meta.json; add that too, please.

Describe alternatives you’ve considered Alternatively consider offering full support for the front-end functions included in the aws-amplify library, such as querying of GraphQL APIs, from back-end functions. FYI it currently “just works” if you include a fetch polyfill (e.g. cross-fetch/polyfill), but the authentication process is obviously geared toward use cases with a static user (as it stores a lot of data in global state).

Additional context Ref: #621

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:31
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
lanceharpercommented, Jun 13, 2019

how does one access environmental variables outside of those generated by amplify such as for third party services such that can be stored in the SSM parameter store? https://serverless.com/framework/docs/providers/aws/guide/variables/ is a good execution of what I hope is exposed by Amplify.

4reactions
pauloelicommented, Mar 21, 2019

This gonna be very helpful

Read more comments on GitHub >

github_iconTop Results From Across the Web

Generate a Cloud Backend using AWS Amplify - Luminis
In this blog we will cover Hosting, Authentication, API, Function and ... More on this later. amplify/backend/amplify-meta.json: The same as ...
Read more >
Ramping up on the AWS Amplify CLI code base - Aditya Sharma
The project metadata is stored in the file amplify/backend/amplify-meta.json in the user project. You can explore the plugin package ...
Read more >
Reference - Files and Folders - AWS Amplify Docs
The amplify-meta.json in the backend directory serves as the whiteboard for the CLI core and the plugins to log internal information and communicate...
Read more >
Usage - GitHub Pages
The Amplify CLI arguments are not simple strings, but JSON objects containing information that the CLI would otherwise gather through prompts.
Read more >
AWS-Amplify/Lobby - Gitter
If I use a mongodb instead of DynamoDB using a global resolver / function, ... I'm OK with editing files like "backend/api/stacks/CustomResources.json" or ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found