Your company is implementing a new CI/CD pipeline using AWS CodePipeline and AWS CodeBuild. You need to ensure that the pipeline has the necessary permissions to access other AWS services. Which of the following steps should you take to achieve this?