title: Is creating a new user in Amazon Cognito and sharing his credentials publicly a good practice?
body: <p>I have a backend app that provides measurement data through the use of REST API.</p>
  
  <p>Now, I'm creating a frontend app that can visualize and query that data depending on parameters such as <code>city</code>, <code>fromDateTime</code>, <code>tillDateTime</code>, <code>sponsorId</code> etc.</p>
  
  <p>I'd like to assign attributes to specific users that would describe how visualization should look like and what exactly they can query from my REST API. For example, a specific sponsor of measurement devices can only see data from the devices they bought.</p>
  
  <p>However, I'd like them to be able to make their data public. How to do that?</p>
  
  <p>I thought, in that kind of situation, I could make a new user with appropriate attributes and make its credentials public. Then, create a URL with something like <code>/user/{username}/data/</code> in the path. The <code>username</code> could be randomly generated and the password could be the same to all public users and could be hardcoded into the frontend app.</p>
  
  <p>What do you think about this approach? Is it a good idea? Is it secure? Maybe there's another better way to do that?</p>