exam questions

Exam AWS Certified Solutions Architect - Professional SAP-C02 All Questions

View all questions & answers for the AWS Certified Solutions Architect - Professional SAP-C02 exam

Exam AWS Certified Solutions Architect - Professional SAP-C02 topic 1 question 74 discussion

A company is running several workloads in a single AWS account. A new company policy states that engineers can provision only approved resources and that engineers must use AWS CloudFormation to provision these resources. A solutions architect needs to create a solution to enforce the new restriction on the IAM role that the engineers use for access.

What should the solutions architect do to create the solution?

  • A. Upload AWS CloudFormation templates that contain approved resources to an Amazon S3 bucket. Update the IAM policy for the engineers’ IAM role to only allow access to Amazon S3 and AWS CloudFormation. Use AWS CloudFormation templates to provision resources.
  • B. Update the IAM policy for the engineers’ IAM role with permissions to only allow provisioning of approved resources and AWS CloudFormation. Use AWS CloudFormation templates to create stacks with approved resources.
  • C. Update the IAM policy for the engineers’ IAM role with permissions to only allow AWS CloudFormation actions. Create a new IAM policy with permission to provision approved resources, and assign the policy to a new IAM service role. Assign the IAM service role to AWS CloudFormation during stack creation.
  • D. Provision resources in AWS CloudFormation stacks. Update the IAM policy for the engineers’ IAM role to only allow access to their own AWS CloudFormation stack.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
God_Is_Love
Highly Voted 2 years, 4 months ago
Selected Answer: C
Tricky one. Question has a hint -"to enforce the new restriction on the IAM role" (note its not IAM policy as mentioned in option B) Creating a policy with approved resources first and assuming/applying that role to engineers will enforce. So C is correct. (B lacks enforcement, B is incorrect)
upvoted 18 times
...
rbm2023
Highly Voted 2 years, 1 month ago
Selected Answer: C
C is correct not B , AWS CloudFormation makes calls to create, modify, and delete those resources on their behalf. To separate permissions between a user and the AWS CloudFormation service, use a service role. AWS CloudFormation uses the service role's policy to make calls instead of the user's policy. For more information, see AWS CloudFormation service role . check this out . https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html Option B would allow engineers to provision resources using other methods outside of CloudFormation, which would not comply with the new company policy. This would make it difficult to enforce the new restriction on the IAM role that the engineers use for access.
upvoted 11 times
...
amministrazione
Most Recent 10 months ago
C. Update the IAM policy for the engineers’ IAM role with permissions to only allow AWS CloudFormation actions. Create a new IAM policy with permission to provision approved resources, and assign the policy to a new IAM service role. Assign the IAM service role to AWS CloudFormation during stack creation.
upvoted 1 times
...
gofavad926
1 year, 3 months ago
Selected Answer: C
C, use the IAM service role to execute the stack
upvoted 1 times
...
8608f25
1 year, 4 months ago
Selected Answer: C
Option C is the most effective solution. It involves updating the engineers’ IAM role to only allow actions related to AWS CloudFormation, effectively preventing direct provisioning or modification of AWS resources outside of CloudFormation. By creating a service role (with permissions to provision approved resources) that CloudFormation assumes when executing templates, you enforce the provisioning of only approved resources through CloudFormation. This setup provides a clear separation of permissions: engineers can manage CloudFormation stacks but cannot directly create resources unless defined in a CloudFormation template and permitted by the service role. Option B suggests updating the IAM policy to allow only the provisioning of approved resources and CloudFormation actions. This approach could theoretically work by explicitly listing allowed actions for specific AWS services in the IAM policy. However, it might be challenging to maintain and could inadvertently permit actions outside of CloudFormation, depending on the policy’s specificity.
upvoted 2 times
...
ninomfr64
1 year, 5 months ago
Selected Answer: C
A = doesn't prevent to have a CloudFromation template with non-approved resources deployed B = this doesn't prevent engineers to provision resources from console or cli C = correct D = doesn't prevent to provision non-approved resources or to provision only via CloudFormation
upvoted 2 times
...
subbupro
1 year, 6 months ago
B would be created generally in organization. C is fine , but more restriction , the user can only use the cloud formation stack sets only which is not good for organization level.
upvoted 1 times
...
severlight
1 year, 7 months ago
Selected Answer: C
with B engineer will be able to directly provision resources without using of CF
upvoted 2 times
...
venvig
1 year, 10 months ago
Selected Answer: C
The two contenders are Option B and C. Option B would allow the users to provision the approved resources without using CloudFormation (as the Users’ IAM role would permission that). So, this violates the requirement. Option C would ensure that Only Cloudformation can provision the resources. So, that’s the correct answer.
upvoted 1 times
...
CuteRunRun
1 year, 10 months ago
Selected Answer: C
I prefer C, because you need to give permission to cloud formation
upvoted 1 times
...
NikkyDicky
2 years ago
Selected Answer: C
C no doubt
upvoted 1 times
...
mfsec
2 years, 3 months ago
Selected Answer: C
C. Update the IAM policy for the engineers’ IAM role with permissions to only allow AWS CloudFormation actions.
upvoted 2 times
...
c73bf38
2 years, 4 months ago
Selected Answer: C
C IAM policy is allowing to provision of approved resources.
upvoted 3 times
...
Musk
2 years, 5 months ago
Selected Answer: C
B does not enfore CF, otherwise it would work.
upvoted 3 times
...
Untamables
2 years, 5 months ago
Selected Answer: C
C https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/security-best-practices.html#use-iam-to-control-access https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html
upvoted 3 times
...
Nicocacik
2 years, 5 months ago
Selected Answer: C
You have to use a service role
upvoted 4 times
...
masetromain
2 years, 5 months ago
C. Update the IAM policy for the engineers’ IAM role with permissions to only allow AWS CloudFormation actions. Create a new IAM policy with permission to provision approved resources, and assign the policy to a new IAM service role. Assign the IAM service role to AWS CloudFormation during stack creation. This option is also correct, it is a way to restrict the access of engineers to only be able to perform AWS CloudFormation actions and provision only approved resources. By giving only permissions to the IAM role used by engineers for CloudFormation and creating a separate IAM role with permissions to provision approved resources and then assigning that role to CloudFormation during stack creation, we ensure that engineers can only provision the approved resources using CloudFormation.
upvoted 2 times
masetromain
2 years, 5 months ago
Both options B and C are correct. Option B: Update the IAM policy for the engineers’ IAM role with permissions to only allow provisioning of approved resources and AWS CloudFormation. Use AWS CloudFormation templates to create stacks with approved resources. Option C: Update the IAM policy for the engineers’ IAM role with permissions to only allow AWS CloudFormation actions. Create a new IAM policy with permission to provision approved resources, and assign the policy to a new IAM service role. Assign the IAM service role to AWS CloudFormation during stack creation. Both options will enforce the new restriction on the IAM role that the engineers use for access, by limiting their access only to approved resources and only allowing them to provision resources using AWS CloudFormation. The specif
upvoted 1 times
Japanese1
1 year, 7 months ago
B works but is inappropriate. You fail to consider that you NEED to use CFn for resource provisioning. Option B does not meet the requirement to limit this.
upvoted 1 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 ...