apprunner-roadmap
apprunner-roadmap copied to clipboard
Provide service and instance metadata at runtime via environment variables
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do * not help prioritize the request If you are interested in working on this issue or have submitted a pull request, please leave a comment
Tell us about your request What do you want us to build?
It would be incredibly useful for an instance to identify basic metadata about itself, i.e. the service name, ID, and instance ID.
Most importantly, the instance ID gives the instance a means to identify itself uniquely alongside other instances when connecting to a 3rd party service.
In my use case, this would be connecting to AWS IoT Core MQTT Broker with a unique client ID that is easily correlated to a running instance.
In Heroku, there are a number of metadata environment variables that are available to 'dynos' (instances) to help it identify itself. See https://devcenter.heroku.com/articles/dyno-metadata#dyno-metadata
These environment variables are also useful for logging purposes, as well as identifying when the code is being run in a hosted environment.
Describe alternatives you've considered
I'm still trying to come up with alternatives to the techniques we've used with Heroku environment variables, in hopes that we can migrate to App Runner.
Additional context Anything else we should know?
Attachments If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)
You can add environment variables in the Service settings > Environment variables > Add environment variable. However, there are a couple of caveats:
- If you use apprunner.yml you can't also define environment variables in the console
- Environment variables defined in the console are not available during the build phase
Thanks for both of these links as they are useful links - however I what I mean by my description is having metadata about the instance provided by App Runner through environment variables, like Heroku does: https://devcenter.heroku.com/articles/dyno-metadata#dyno-metadata