Does AWS CodeBuild already has aws-cli installed? If yes, do i still need to configure a profile or a role attached to codebuild would be sufficient?
Best Regards
Just to make it clearer and concise: CodeBuild can't have aws-cli installed, but the images it uses to run a build can have it.
Images managed by AWS CodeBuild do have AWS CLI and you can verify it by simply adding aws --version
to one of you commands (pre_build might be a good place for that).
Same check can be done for the custom images, if you're not sure.
You can find more details on the Github page on what packages are installed in the images. In the AWS documentation you can find the links to the according Github pages.