'What happens if I edit aws-exports.js?

Despite the way AWS Amplify currently works, some tools (e.g. EAS) require aws-exports.js to be included in a project's repo. However in order to safely do this, aws-exports.js needs to be edited locally so that sensitive information there is replaced with environment variables.

My question is, what happens if I do that? If I edit aws-exports.js and replace values there with environment variables

  1. will any of my edits get overwritten by my use of the Amplify CLI (e.g., push or pull or add or update)?
  2. Will any of my edits end up affecting the configuration of the backend?


Solution 1:[1]

Currently the way Honeycomb recommends solving this problem is through a OpenTelemetry collector in-between your application and their API.

The idea is that you can send traces via HTTPS to your collector, via whatever form of security works for your infrastructure, and then have the collector massage your data before sending it to Honeycomb (thus keeping your Honeycomb API key from being exposed to the browser).

Source: https://www.honeycomb.io/blog/opentelemetry-browser-instrumentation/


I plan on updating this answer as Honeycomb updates their API to handle trace collection over HTTPS.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 jonathan3692bf