---
title: "Create IAM Policies"
canonical: "https://docs.infoblox.com/space/DeploymentGuideIntegratingB1TDwithAWSRoute53/664404005/Create%20IAM%20Policies"
format: markdown
---
In order to run the Lambda script, the script must have permission to interact with the varying AWS components that are called. To give permissions to the Lambda script, perform the following steps:

1. Input **IAM** into the *search bar* located at the top of the AWS interface.

![image](media://c67416e5-f3c5-4083-b5ba-3493304c99b2)

2. Locate and click on **IAM** to navigate to the *IAM* page.

![A screenshot of a computer

Description automatically generated with medium confidence](media://b416a3fa-e544-4e47-8d38-926a752799ae)

3. In the *IAM navigation pane*, click **Policies **located under the *Access management *header.

![A screenshot of a search engine

Description automatically generated with low confidence](media://9597abba-7505-40cb-a6c3-071990f67962)

4. Two policies are required for this integration, first create a policy to allow the Lambda script to interact with the AWS Route 53 DNS Firewall domain list. On the *Policies* page, click **Create Policy** located on the top right of the page.

![A screenshot of a computer screen

Description automatically generated with low confidence](media://d834081e-708d-4152-b924-c445ea08317e)

5. On the *Create Policy* page, click the **JSON** button.

![A white rectangle with black text

Description automatically generated with medium confidence](media://9ec534bc-257a-449a-96a9-c8541283082c)

6. **Copy** the following JSON code:

{

"Version": "2012-10-17",

"Statement": [

     {

         "Sid": "VisualEditor0",

         "Effect": "Allow",

         "Action": [

             "route53resolver:CreateFirewallRule",

             "route53resolver:CreateFirewallRuleGroup",

             "route53resolver:CreateFirewallDomainList",

             "route53resolver:ListFirewallRules",

             "route53resolver:ListFirewallDomains",

             "route53resolver:GetFirewallDomainList",

             "route53resolver:UpdateFirewallDomains",

             "route53resolver:GetFirewallRuleGroup",

             "route53resolver:DeleteFirewallDomainList",

             "route53resolver:ListFirewallDomainLists",

             "route53resolver:ImportFirewallDomains"

         ],

         "Resource": "*"

     }

]

}

7. **Replace **all code in the JSON text box with the code copied from the previous step.

![A screenshot of a computer program

Description automatically generated with medium confidence](media://5ed80b84-24fd-4652-86e8-c699c1ce79fc)

8. Click the** Next** button located on the bottom right of the page.

![A screenshot of a computer

Description automatically generated with low confidence](media://999123aa-87f0-4a66-a9c6-1c088fc3ea6b)

9. On the Review policy page, perform the following steps:
  - Give the policy a** Name.**

![A screenshot of a phone

Description automatically generated with low confidence](media://356b0629-6e22-4b3a-a36c-eb6a354935d5)

- (Optional) If desired, give the policy a **Description.**

![A screenshot of a computer

Description automatically generated with low confidence](media://86967ee4-1d68-46e6-b132-32cbe4973be7)

- (Optional) If desired, add tags via the **Add tag** button.

![A screenshot of a computer

Description automatically generated with low confidence](media://0c50d11e-cd3c-4425-9470-d3b62330d9e7)

- Click the **Create policy** button located on the bottom right of the page to confirm the creation of the Policy.

![A picture containing text, screenshot, font, electric blue

Description automatically generated](media://ab7d5e25-2967-4a91-bc45-b63a977b8fef)


10. Now create a second policy to allow the Lambda script to interact with the S3 bucket. On the *Policies* page, click **Create Policy** located on the top right of the page.

![A screenshot of a computer screen

Description automatically generated with low confidence](media://d834081e-708d-4152-b924-c445ea08317e)


11. On the *Create Policy* page, click the **JSON** button.

![A white rectangle with black text

Description automatically generated with medium confidence](media://9ec534bc-257a-449a-96a9-c8541283082c)


12. **Copy** the following JSON code:

{

"Version": "2012-10-17",

"Statement": [

     {

         "Sid": "VisualEditor0",

         "Effect": "Allow",

         "Action": "s3:ListBucket",

         "Resource": "arn:aws:s3:::test"

     },

     {

         "Sid": "VisualEditor1",

         "Effect": "Allow",

         "Action": [

             "s3:PutObject",

             "s3:GetObject",

             "s3:DeleteObject"

         ],

         "Resource": "arn:aws:s3:::name_of_bucket/*"

     }

]

}


13. **Replace **all code in the JSON text box with the code copied from the previous step.

![A screenshot of a computer program

Description automatically generated with medium confidence](media://1b53d7e2-77df-448d-a21a-6956cc632437)

14. On line 18, remove the text ‘*name_of_bucket*’, and **replace** it with the name of the bucket you created on <u>*[pages 50-51](https://docs.google.com/document/d/1Pj7QxwgJf_ko0bxtnYiN0NfRd2UE07ZR/edit#heading=h.28h4qwu)*</u>. *Note, In the example screenshot the name of my bucket is ‘r53-b1td-bucket‘, without quotations*.

![A screenshot of a computer

Description automatically generated with medium confidence](media://3546bd47-74c9-4a34-84c7-72e0ccab1857)


15. Click the** Next** button located on the bottom right of the page.

![A screenshot of a computer

Description automatically generated with low confidence](media://999123aa-87f0-4a66-a9c6-1c088fc3ea6b)

16. On the *Review policy* page, perform the following steps:
  - Give the policy a** Name.**

![A picture containing text, receipt, screenshot, font

Description automatically generated](media://f4a01040-3e22-4f89-af4d-80fd46ed951f)

- (Optional) If desired, give the policy a **Description.**

![A screenshot of a phone

Description automatically generated with low confidence](media://26a85e26-ee00-41ef-a1c8-b7ef0a488a51)

- (Optional) If desired, add tags via the **Add tag** button.

![A screenshot of a computer

Description automatically generated with low confidence](media://0c50d11e-cd3c-4425-9470-d3b62330d9e7)

- Click the **Create policy** button located on the bottom right of the page to confirm the creation of the Policy.

![A picture containing text, screenshot, font, electric blue

Description automatically generated](media://ab7d5e25-2967-4a91-bc45-b63a977b8fef)


17. In the *IAM navigation pane*, click **Roles **located under the *Access management *header.

![A screenshot of a search engine

Description automatically generated with low confidence](media://c39643fc-2f02-4457-b5f8-761d8bbcc471)

18. On the Roles page, locate and** click** the role that has been automatically created for your lambda function. *Note the role should contain the Lambda function’s name in it. In the example screenshot, the Role name is Tide-R53-Integration-role-dfz32r2lc.*

![A screenshot of a computer

Description automatically generated with medium confidence](media://6bfaa797-a3ce-4c4a-a6f5-46a3df4a5763)

19. On the role’s *Summary* page, click the **Add permissions** button, then click the **Attach policies** button located in the list that is revealed.

![A screenshot of a computer

Description automatically generated with low confidence](media://dafbe3df-12c7-4db0-be45-8ab5255d08a2)

20. Locate the two policies created earlier in this section. Click the** checkbox **associated with both Policies.

![A screenshot of a computer

Description automatically generated with medium confidence](media://5483c6e2-1f43-4795-867b-4f78022bf241)

21. Click **Add permissions** to confirm the attaching of the two policies.

![A blue and white button

Description automatically generated with low confidence](media://b4f91fd9-ea39-4363-9643-85bf24c1d6c8)