How do Route 53 resource record set IAM policies work?

0

AWS added granular Route 53 resource record set IAM conditions. There's documentation, but if you copy and paste one of the example policies into IAM, it shows an error that the condition doesn't exist, and a security warning that Forallvalues should not be used.

How would one actually write an IAM policy to, for example:

  • CREATE or DELETE record sets
  • of type TXT
  • with names matching _acme-challenge.*?
已提问 2 年前649 查看次数
2 回答
1

[+] This can be updated using the Policy feature of IAM
[+] Please find the JSON file for the LAB setup that I have performed.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "route53:ChangeResourceRecordSets",
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "route53:ChangeResourceRecordSetsNormalizedRecordNames": "_acme-challenge.*"
                },
                "StringEqualsIfExists": {
                    "route53:ChangeResourceRecordSetsRecordTypes": "TXT",
                    "route53:ChangeResourceRecordSetsActions": [
                        "CREATE",
                        "DELETE"
                    ]
                }
            }
        }
    ]
}

[+] How to go about this.
[-] Create New Policy by selecting service : Route53
[-] Navigate to Action --> Access level
[=] Collapse Write [access level]
[=] Select - ChangeResourceRecordSets

[-] Now navigate to Resources
[=] This would depend on use-case

[-] Navigate to Request Conditions
[=] Add Condition
[=] Under Condition Key you get to see all the options under [Service level condition keys]
ChangeResourceRecordSetsNormalizedRecordNames
ChangeResourceRecordSetsActions
ChangeResourceRecordSetsRecordTypes

Please refer the Json [from LAB setup] which would provide you with first-hand information as per the question.

AWS
RiKa
已回答 2 年前
  • Hmm. Using the visual editor is a good idea. But clicking on the JSON tab still shows the "Invalid Service Condition Key" errors! :-/

1

This may be a display error since this is a new feature update and the console at IAM may be updating it soon. We have brought it to the attention. Can you please try to see if this is preventing you with creation of the policy. If you are able to proceed with the creation and test the permissions?

profile pictureAWS
专家
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则