What is the primary purpose of AWS CodeCommit?
It is a fully managed, secure Git repository service used for storing source code and is the trigger for AWS CodePipeline workflows.
How do users authenticate to CodeCommit?
They use IAM credentials (for HTTPS) or SSH keys that are mapped to an IAM user, ensuring access control is managed via IAM policies.
What AWS service is typically used to automatically run a build, test, and package application code stored in CodeCommit?
AWS CodeBuild
How can you automate actions (like running tests or sending notifications) when a pull request is created or code is pushed to CodeCommit?
Use Amazon EventBridge to detect CodeCommit repository events and trigger targets like AWS Lambda or AWS CodePipeline.
What is the best practice for giving a developer granular access (e.g., only allowing read/write on a specific branch) to a CodeCommit repository?
Use IAM policies with CodeCommit condition keys (e.g., codecommit:References) to restrict access based on branch name patterns.
If you want to require two approvals before code can be merged into the main branch, what CodeCommit feature should you configure?
Pull Request Approvals combined with a Branch Protection Rule
What is the primary function of AWS CodeBuild?
A fully managed continuous integration service that compiles source code, runs tests, and produces ready-to-deploy software packages (artifacts).
What is the build configuration file for CodeBuild, and where is it located?
It is called buildspec.yml, and it must be located in the root directory of your source code repository (e.g., CodeCommit, S3, or GitHub).
What are the four main phases in a CodeBuild buildspec.yml file?
install (Install dependencies/tools),pre_build (Preparation commands),build (Actual build commands),post_build (Cleanup, testing, notifications).Where does CodeBuild store the final packaged application (artifacts) by default?
In an Amazon S3 bucket. The artifacts section of the buildspec.yml defines which files are packaged and uploaded.
How can you securely pass secrets like API keys or database credentials to a CodeBuild job?
By storing them in AWS Secrets Manager or AWS Systems Manager Parameter Store (SecureString), and referencing them in the CodeBuild environment variable settings.
What are the two types of compute environments for CodeBuild?
If a build needs more processing power or memory, how can you scale CodeBuild?
By choosing a larger Compute Type (e.g., BUILD_GENERAL1_LARGE or BUILD_GENERAL1_2XLARGE) during project configuration.
What happens if an AWS CodeBuild project fails?
The entire build process immediately stops, and the logs are sent to Amazon CloudWatch Logs for debugging. The failure stops the upstream CodePipeline process.