SCP to deny tag deletion not working for SQS

0

I implemented an SCP to prevent tag deletion for our Tag Policy, but some services, like SQS, aren't functioning. Just curious as to why.

But it functions perfectly on EC2.

{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Sid": "DenyTagDelectionSCP",
			"Effect": "Deny",
			"Action": [
				"ec2:DeleteTags",
				"sqs:UntagQueue"
			],
			"Resource": [
				"arn:aws:ec2:*:*:instance/*",
				"arn:aws:sqs:*:*:*"
			],
			"Condition": {
				"Null": {
					"aws:RequestTag/Team": "false"
				}
			}
		}
	]
}
질문됨 일 년 전364회 조회
1개 답변
1
수락된 답변

One of the interesting things "under the hood" is that there isn't much that is centralised within AWS. One of those things is the evaluation of IAM (and by extension SCP) policies. So what works with one service doesn't necessarily work with another. This is a good example of that.

My general advice here (around SCPs) is not to use preventative controls when detective controls will do. It's very easy to get into a space where SCPs are very large (and bumping into size limits) with many exceptions (for all the things that exceptions are required for). SCPs are great for "this must never happen" type events. Things that are business critical events.

For everything else, consider using detective controls (usually in the form of Config Rules) because those give a lot more flexibility in terms of what you're looking for; and also many more ways to mitigate the problem afterwards (which could be alerting or automatically deployed fixes).

In these discussions I point customers at Eric Brandwine's excellent re:Invent talk where he walks through how the AWS security team has been on a very similar journey. Specifically that preventative controls are good for things that are super critical; and for things that aren't: detective controls are better. Because (in general) this path means that "security" doesn't get in the way of the business.

profile pictureAWS
전문가
답변함 일 년 전
profile picture
전문가
검토됨 11일 전
profile picture
전문가
검토됨 일 년 전
profile picture
전문가
검토됨 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠