title: AWS CodeBuild by non-root user using `run-as` build spec
body: <p>I would like to build with non-root user. To achieve this I'm looking at <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html" rel="noreferrer">run-as</a> build spec. </p>
  
  <blockquote>
    <p>run-as: Optional sequence. Available to Linux users only. Specifies a Linux user that runs commands in this buildspec file. run-as grants the specified user read and execute permissions. When you specify run-as at the top of the buildspec file, it applies globally to all commands. If you don't want to specify a user for all buildspec file commands, you can specify one for commands in a phase by using run-as in one of the phases blocks. If run-as is not specified, then all commands run as the root.</p>
  </blockquote>
  
  <ol>
  <li>How do I create the non-root user to put in <code>run-as</code>?</li>
  <li>Where do I create that user?</li>
  <li>What permissions I need to set since the cloned source files from git are owned by root?</li>
  </ol>