Which solution will meet these requirements?
From the main branch, create a feature branch for production bug fixes. Create a second feature branch from the main branch for development of the new version.
Create a Git tag of the code that is currently deployed in production. Create a Git tag for the development of the new version. Push the two tags to the CodeCommit repository.
From the main branch, create a branch of the code that is currently deployed in production. Apply an IAM policy that ensures no other users can push or merge to the branch.
Create a new CodeCommit repository for development of the new version of the application. Create a Git tag for the development of the new version.
Explanations:
Creating separate feature branches for production bug fixes and development of the new version allows parallel work without interference. The production fixes can be deployed while the new version is being developed.
Git tags represent specific points in history, but they do not allow for ongoing development or parallel work. Tags are static references and cannot be used for continuous bug fixing or development.
Creating a branch for production fixes is a valid approach, but applying an IAM policy to restrict pushes or merges to the branch is unnecessary and would complicate the workflow. IAM policies should be used for access control, not for enforcing workflow.
Creating a new repository for the new version of the application is unnecessary. Using a new repository introduces additional complexity when managing production and development code within the same repository. It’s better to manage this using branches within the same repository.