Context: My company has private API that we only expose to our our employees and vendors who need access to it. That being said there are a few parts of it that don't require login to view, namely the status-check and login endpoints.
As a part of debugging, right now we include the AWS Instance ID whenever any error occurs. Here is an example of the information that the API may return on a failed login:
NOTE: This is pseudo-data and our actual API responses are different.
{
"status": {
"code": 400,
"name": "Bad Request",
"description": "This request is missing data or contains invalid information."
},
"error_data": {
"environment": "PRODUCTION",
"instance": "i-0b22b2d35aaaaaaaa",
"message": "Failed to login"
}
}
In the past we have found this to be very useful for tracking down EC2 specific issues (usually low memory, low disk space, and/or nginx needs to be restarted).
My Question: Does exposing the AWS Instance ID cause any security concerns and/or is there any reason not to?
It would also be helpful if there was a better way to identify individual instances, if the instance ID shouldn't be exposed?