Articles → AWS → Create a conditional policy using the AWS policy generation tool

Create a conditional policy using the AWS policy generation tool






What should I know before reading this article?





Scenario





Different steps of creating conditional policy




  1. Generate the policy JSON using the AWS policy generation tool.
  2. Create a new policy using the JSON in the AWS console.



Generate the policy JSON using the AWS policy generation tool




Picture showing the search result of aws policy generation tool in google search page

Click to Enlarge



Picture showing the aws policy generation page

Click to Enlarge



FieldValue
Select Type of PolicyIAM Policy
EffectAllow
AWS ServiceAmazon EC2
ActionsAll Actions
Amazon Resource Name(ARN)*




FieldValue
ConditionStringLike
Keyec2 region
Valueus-east-1


Picture showing a section of aws policy generation page to add conditions

Click to Enlarge



Picture showing the condition gets added on click of Add statement button

Click to Enlarge



Picture showing the json text of the policy created using the aws policy generation tool

Click to Enlarge




Create a new policy using the JSON in the AWS console




Picture showing the create policy button for adding the new policy

Click to Enlarge



Picture showing the JSON tab to paste the policy generated using the aws policy generation tool

Click to Enlarge



Picture showing the JSON tab pasted in the JSON tab while creating the policy

Click to Enlarge




Posted By  -  Karan Gupta
 
Posted On  -  Sunday, September 19, 2021

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250