exam questions

Exam AWS DevOps Engineer Professional All Questions

View all questions & answers for the AWS DevOps Engineer Professional exam

Exam AWS DevOps Engineer Professional topic 1 question 70 discussion

Exam question from Amazon's AWS DevOps Engineer Professional
Question #: 70
Topic #: 1
[All AWS DevOps Engineer Professional Questions]

A company has a single developer writing code for an automated deployment pipeline. The developer is storing source code in an Amazon S3 bucket for each project. The company wants to add more developers to the team but is concerned about code conflicts and lost work. The company also wants to build a test environment to deploy newer versions of code for testing and allow developers to automatically deploy to both environments when code is changed in the repository.
What is the MOST efficient way to meet these requirements?

  • A. Create an AWS CodeCommit repository for each project, use the main branch for production code, and create a testing branch for code deployed to testing. Use feature branches to develop new features and pull requests to merge code to testing and main branches.
  • B. Create another S3 bucket for each project for testing code, and use an AWS Lambda function to promote code changes between testing and production buckets. Enable versioning on all buckets to prevent code conflicts.
  • C. Create an AWS CodeCommit repository for each project, and use the main branch for production and test code with different deployment pipelines for each environment. Use feature branches to develop new features.
  • D. Enable versioning and branching on each S3 bucket, use the main branch for production code, and create a testing branch for code deployed to testing. Have developers use each branch for developing in each environment.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
dinhvu
Highly Voted 3 years, 6 months ago
the correct answer is A
upvoted 15 times
...
shankyup43
Highly Voted 3 years, 6 months ago
The answer should be C because of below line in the question: "allow Developers to automatically deploy to both environments when code is changed in the repository". Option A does not talk about deployment.
upvoted 6 times
JohnnieWalker
3 years, 5 months ago
I think it is (C) too because it has a pipeline for deployment and this is a requirement. (A) doesnt mention deployment, there is no pipelines. Regarding WhyIronMan comment, it doesnt mention it will deploy to production without test, in fact it will have 3 pipelines dev, test and prod, so the code will be tested on the test pipeline, and then deployed to prod as they are separate pipelines.
upvoted 2 times
...
WhyIronMan
3 years, 6 months ago
So, you want deploy do production without test? what warranties you that the code is functional and its not broken? Genius strategy
upvoted 4 times
is4_
3 years, 5 months ago
I accidentally liked your answer, but I don't. Nobody is saying that you should not test the code deployed to test environment before proceeding to deploy it to production. How will you know that it is the same code that is deployed in test and production if you deploy from different branches? I'm a developer so I should know :) You're not so genius yourself.
upvoted 2 times
...
...
...
easytoo
Most Recent 2 years, 1 month ago
using the main branch for both production and test code can lead to issues with tracking changes and version control. It can also make it difficult to deploy code automatically to the correct environment. That's why the answer is A and not C.
upvoted 2 times
...
Piccaso
2 years, 2 months ago
Selected Answer: A
B and D are eliminated, will make chaos. C is an incomplete version of A. If we do not use CodeCommit, we should combine different env files to different branches, like test, staging, prod....
upvoted 1 times
...
sasivarenan
2 years, 2 months ago
Selected Answer: A
A) Explains the branching strategy
upvoted 2 times
...
Bulti
2 years, 3 months ago
Correct answer is A. There is nothing that suggests that the code needs to be deployed simultaneously in both environments. It just says automatically to both environments. That doesn't mean the pull request from a feature branch needs to be created against both test and prod at the same time. What A will enable us to do is have the feature engineer submit a pull request into the test branch and have the admin user of the tear branch review and approve the pull request. This should automatically start the deployment into the test environment. Once the code is full tested by the QA resource in the test environment, they will initiate a pull request into the Prod environment. The prod environment admin user will review and approve the pull request at which point the code will be automatically deployment to the Prod environment. With C on the other hand submitting a pull request from the feature branch to the master branch will result in triggering the deployment via both pipelines at the same time which means the code will be deployed into production before testing it in the test environment successfully.
upvoted 6 times
...
saeidp
2 years, 3 months ago
Selected Answer: A
I'll go with A
upvoted 2 times
...
Chinta
2 years, 3 months ago
Answer is A ,as per the question you have to eploy new version of code for testing
upvoted 2 times
...
USalo
2 years, 5 months ago
Selected Answer: C
C. It cannot be A because you make the same PR to both branches at the same time ONLY when you need a hotfix to prod and test env. In real world you develop in one branch and when you need a release you merge all the dev branch to prod branch (or create a new version from dev branch if you need to support multiple versions). But you NEVER EVER make PRs to both dev and prod branches during development. If you both branches are always the same - why do you need 2 branches ? If your master and testing branches differ then at some point you will have conflicts. Only C makes sense.
upvoted 1 times
...
RightAnswers
2 years, 7 months ago
Selected Answer: C
With a different test branch, there is no way to know if the same code is deployed to two different environments.
upvoted 1 times
...
MichaelExam
2 years, 7 months ago
Selected Answer: A
I choice A The difference between A and C is that C uses master branch for the production and testing environment, A uses different branches for the production and testing environment. The better way is A. B,D S3 is not good choice for team working.
upvoted 3 times
...
jexam211
2 years, 8 months ago
Selected Answer: A
Honestly a prefer 3 different branches, A option Event with the C option different pipelines, which event is triggering the pipeline, when i push the commit in the test/prod branch bad idea, manual trigger? not too devOps at least, another type of trigger maybe add more complexity.
upvoted 4 times
...
[Removed]
3 years, 1 month ago
Selected Answer: C
different codepipelines for the same branch seems normal
upvoted 2 times
...
WhyIronMan
3 years, 5 months ago
I'll go with A. for those choosing C: So, do you want deploy do production without testing first? what warranties you that the code is functional and its not broken? Yeah, keep deploying untested code to production...its a genius strategy
upvoted 4 times
is4_
3 years, 5 months ago
You often deploy from the same branch so that you know that it is the same code running in all environments. How will you know this otherwise? That can be really unstable if you dont have a pipeline set up that makes sure that no one can push to the master branch anywhere else than from this "test branch". But you ALWAYS test the code in the test / staging environment before proceeding to deploy it to production. This is how its often done (ofc exceptions exists) and it is a very good strategy. I bet y'all answering here have no experience working as developers, I have and I know this.
upvoted 4 times
gofavad926
3 years, 3 months ago
Agree with C, talking about branch strategy (only master for 2 environments) and mention deployments. A is not talking about deployment so you are not meeting the requirements... only mention branch strategy (in more detail and different from A)
upvoted 3 times
...
...
...
aws_Tamilan
3 years, 6 months ago
Correct Answer: C
upvoted 2 times
...
rscloud
3 years, 6 months ago
A is correct
upvoted 2 times
...
dnevado
3 years, 6 months ago
Agreed with A
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago