Prevent tag changes unless a specific user or lambda function?

0

Hello,

I'm trying to prevent certain tags from being edited unless they are part of an admin group or a lambda function. I've used an scp to be able to do this as far as users, however, it prevents the lambda function from editing or adding any tags.

Is there any way to go about preventing changes to specific tags via an SCP unless an approved group role or lambda function? Or is there a better option than using an SCP?

branney
已提問 9 個月前檢視次數 329 次
2 個答案
0

Hello.
As I answered in the following post, I think it can be controlled by using "Condition".
The "aws:PrincipalArn" can be controlled by setting it to the ARN of the IAM role used by Lambda.
https://repost.aws/questions/QUaLMr8nNLRIS4-gol-sknMQ/prevent-function-deletion#ANzwYUljYfSzqiBIyWqrkdyQ

profile picture
專家
已回答 9 個月前
0

Hello, Another thing to keep in mind is that each service has their own tagging action, so you need to make sure that each tagging action for each service is restricted in the SCP. You can view the list of services and their actions within this doc: https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html

Additionally, for the conditions on restricting it to specific roles are a lambda function, they may want to use conditions such as these: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourcearn https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-principalarn

AWS
已回答 9 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南