exam questions

Exam AWS Certified DevOps Engineer - Professional DOP-C02 All Questions

View all questions & answers for the AWS Certified DevOps Engineer - Professional DOP-C02 exam

Exam AWS Certified DevOps Engineer - Professional DOP-C02 topic 1 question 61 discussion

A development team wants to use AWS CloudFormation stacks to deploy an application. However, the developer IAM role does not have the required permissions to provision the resources that are specified in the AWS CloudFormation template. A DevOps engineer needs to implement a solution that allows the developers to deploy the stacks. The solution must follow the principle of least privilege.
Which solution will meet these requirements?

  • A. Create an IAM policy that allows the developers to provision the required resources. Attach the policy to the developer IAM role.
  • B. Create an IAM policy that allows full access to AWS CloudFormation. Attach the policy to the developer IAM role.
  • C. Create an AWS CloudFormation service role that has the required permissions. Grant the developer IAM role a cloudformation:* action. Use the new service role during stack deployments.
  • D. Create an AWS CloudFormation service role that has the required permissions. Grant the developer IAM role the iam:PassRole permission. Use the new service role during stack deployments.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
fuzzycom
10 months ago
D is totally correct
upvoted 1 times
...
4555894
1 year, 1 month ago
Selected Answer: D
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html
upvoted 2 times
...
thanhnv142
1 year, 2 months ago
D is correct: Need to create a role for Cloud formation that has the required permissions. Then adding iam:PassRole permission to the dev IAM role to allow them to pass this role to CF A: no mention of creating the required permissions for ACF. Additionally, should not grant permissions for dev. B: grant full access is against the least privilege policy C: no mention of granting iam:PassRole permission to the dev
upvoted 4 times
...
imymoco
1 year, 4 months ago
A is incorrect; A would also allow resources to be used from outside of cfn. Therefore, D is correct.
upvoted 1 times
...
jason7
1 year, 8 months ago
Selected Answer: D
Option D allows you to create a dedicated AWS CloudFormation service role with the precise permissions required for stack deployments. Then, you grant the developer IAM role the iam:PassRole permission, which enables it to pass the service role to AWS CloudFormation without granting it broad IAM permissions. This approach aligns best with the principle of least privilege and ensures developers can deploy stacks while maintaining control over their permissions.
upvoted 2 times
...
ogwu2000
1 year, 9 months ago
B is the answer. DC wrong - Nothing like CloudFormation service-role.
upvoted 1 times
fanq10
1 year, 8 months ago
B is not best practice of using CloudFormation. D is correct, 100% sure. `iam:PassRole` to a CloudFormation Service Role (take a look at this: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html#:~:text=you%20can%20use.-,Important,-When%20you%20specify)
upvoted 1 times
...
DZ_Ben
1 year, 5 months ago
Should be D! See here https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html
upvoted 1 times
...
...
madperro
1 year, 10 months ago
Selected Answer: D
D is the right answer.
upvoted 1 times
...
tartarus23
1 year, 10 months ago
Selected Answer: D
This solution follows the principle of least privilege by creating a specific AWS CloudFormation service role that only has the permissions required for the resources in the AWS CloudFormation stack. The developers are then granted permission to pass this role (iam:PassRole) to the AWS CloudFormation service when they initiate stack deployments, which allows the service to act on behalf of the developer to provision the specified resources.
upvoted 1 times
...
bcx
1 year, 11 months ago
Selected Answer: D
D, you pass the role that can create the resources, the user does not have the right to create the resources himself but can pass the role to CloudFormation so CloudFormation assumes it. IMHO.
upvoted 1 times
...
2pk
1 year, 11 months ago
Selected Answer: D
This allows them to provision the required resources specified in the CloudFormation template without granting them full access to AWS CloudFormation or the underlying resources.
upvoted 1 times
...
ele
1 year, 11 months ago
Selected Answer: D
D , passrole is right action
upvoted 1 times
...
gdtypk
1 year, 11 months ago
Selected Answer: D
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html
upvoted 3 times
...
ParagSanyashiv
1 year, 11 months ago
Selected Answer: D
D is more suitable in this case.
upvoted 1 times
...
Frodo_the_cat
1 year, 11 months ago
C. Create an AWS CloudFormation service role that has the required permissions. Grant the developer IAM role a cloudformation:* action. Use the new service role during stack deployments. By creating an AWS CloudFormation service role with the required permissions, the DevOps engineer can control the resources that the developers can access. This approach ensures that the developers have only the necessary permissions to deploy the stacks, without granting them excessive permissions that could be exploited by malicious actors. The IAM policy granting a cloudformation:* action to the developer IAM role allows the developers to use the AWS CloudFormation service role and deploy the stacks with the required resources. Option A, creating an IAM policy that allows the developers to provision the required resources, is not a good solution because it could potentially grant the developers too much access to resources they don't need. This violates the principle of least privilege.
upvoted 1 times
Frodo_the_cat
1 year, 11 months ago
Option B, creating an IAM policy that allows full access to AWS CloudFormation, is not a good solution either, as it grants excessive permissions to the developers. Option D, creating an AWS CloudFormation service role with the required permissions and granting the developer IAM role the iam:PassRole permission, allows the developers to assume the service role and deploy the stacks with the required resources. However, this option grants additional permissions to the developer IAM role, which could be abused by malicious actors https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html
upvoted 1 times
...
...
kassem77
1 year, 11 months ago
D it is
upvoted 1 times
...
haazybanj
1 year, 12 months ago
Selected Answer: D
Option D is the recommended solution to meet the requirements because it follows the principle of least privilege. The IAM policy that allows the developers to provision the required resources should be created and associated with the IAM role, which should be assigned the iam:PassRole permission for the AWS CloudFormation service role. By doing so, the IAM role can only assume the specific AWS CloudFormation service role and deploy the stack with the required permissions, and not have full access to all resources or full access to AWS CloudFormation.
upvoted 1 times
...
alce2020
2 years ago
Selected Answer: B
B it is
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