- Version: Usually, the date on which the policy was created or changed.
- ID: A policy name.
- Statement: Defines that a set of policy settings will be followed. These policy settings are enclosed within brackets.
{This portion of the policy looks something like this: This section of the policy looks like this: “Version” – “2016-09-21”, Id : “Posey Example Policy”, Statement : [ The policies settings go here ] ]As previously noted, the policy settings that are used can vary depending on what the policy is intended to do.|As mentioned, the policy settings used can vary depending upon the purpose of the policy.} In most cases, there are five strings. These five strings are:
- Sid: The SID is the basic determinant of what the policy does. It should not be confused or confused with a Windows Security Identifier. If the action required is to add a user to an Access Control List, then the SID would likely be AddCannedAcl. The SID could also be set to IPAllow if the policy is to evaluate IP addresses. You can use a variety SIDs as described in the Examples page.
- Effect: The Effect string controls what happens to the policy when it is applied. The effect can be either to allow or deny an action in most cases.
- Principal: The Principal string determines who the policy applies. The Principal string can be set to * to apply to all accounts, but it is possible for each account to be specified.
- Action: What happens if the policy has been applied. For example, “s3:GetObject”, allows the principal to access object data.
- Resource: The bucket to which the statement is applicable. However, you cannot simply enter a bucket’s name. You must use a specific format to enter the bucket name. If, for example, the statement were to apply to a bucket named poseydemo-test, then the resource would be expressed as “arn:aws:s3:::poseydemo-test/*”.
Here is an example of a very simple bucket policy: { “Version”:”2016-09-22″, “Id”: “Posey Sample Policy”, “Statement”: