Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions samtranslator/policy_templates_data/policy_templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,34 @@
}
]
}
},
"Route53ChangeResourceRecordSetsPolicy": {
"Description": "Gives permission to change resource record sets in Route 53",
"Parameters": {
"HostedZoneId": {
"Description": "ID of the hosted zone"
}
},
"Definition": {
"Statement": [
{
"Effect": "Allow",
"Action": [
"route53:ChangeResourceRecordSets"
],
"Resource": {
"Fn::Sub": [
"arn:${AWS::Partition}:route53:::hostedzone/${HostedZoneId}",
{
"HostedZoneId": {
"Ref": "HostedZoneId"
}
}
]
}
}
]
}
}
}
}
3 changes: 3 additions & 0 deletions tests/translator/input/all_policy_templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,6 @@ Resources:

- AcmGetCertificatePolicy:
CertificateArn: arn

- Route53ChangeResourceRecordSetsPolicy:
HostedZoneId: test
21 changes: 21 additions & 0 deletions tests/translator/output/all_policy_templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -1591,6 +1591,27 @@
}
]
}
},
{
"PolicyName": "KitchenSinkFunctionRolePolicy59",
"PolicyDocument": {
"Statement": [
{
"Action": [
"route53:ChangeResourceRecordSets"
],
"Resource": {
"Fn::Sub": [
"arn:${AWS::Partition}:route53:::hostedzone/${HostedZoneId}",
{
"HostedZoneId": "test"
}
]
},
"Effect": "Allow"
}
]
}
}
],
"Tags": [
Expand Down
21 changes: 21 additions & 0 deletions tests/translator/output/aws-cn/all_policy_templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -1591,6 +1591,27 @@
}
]
}
},
{
"PolicyName": "KitchenSinkFunctionRolePolicy59",
"PolicyDocument": {
"Statement": [
{
"Action": [
"route53:ChangeResourceRecordSets"
],
"Resource": {
"Fn::Sub": [
"arn:${AWS::Partition}:route53:::hostedzone/${HostedZoneId}",
{
"HostedZoneId": "test"
}
]
},
"Effect": "Allow"
}
]
}
}
],
"Tags": [
Expand Down
21 changes: 21 additions & 0 deletions tests/translator/output/aws-us-gov/all_policy_templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -1591,6 +1591,27 @@
}
]
}
},
{
"PolicyName": "KitchenSinkFunctionRolePolicy59",
"PolicyDocument": {
"Statement": [
{
"Action": [
"route53:ChangeResourceRecordSets"
],
"Resource": {
"Fn::Sub": [
"arn:${AWS::Partition}:route53:::hostedzone/${HostedZoneId}",
{
"HostedZoneId": "test"
}
]
},
"Effect": "Allow"
}
]
}
}
],
"Tags": [
Expand Down