aws_s3_policy_doc_create | R Documentation |
Create a policy document for an S3 bucket
aws_s3_policy_doc_create(
bucket,
action,
resource,
effect = "Allow",
sid = NULL,
...
)
bucket |
(character) bucket name. required |
action |
(character) an action. required. see Actions below. |
resource |
(character) the object or objects the statement covers; see link below for more information |
effect |
(character) valid values: "Allow" (default), "Deny". length==1 |
sid |
(character) a statement id. optional |
... |
Additional named arguments. See link in Details for options, and examples below |
There's this separate function for creating policy docs for S3 because buckets are globally unique, so AWS figures out the region and account ID for you.
a policy document as JSON (of class json
)
bucket <- random_bucket()
aws_s3_policy_doc_create(
bucket = bucket,
action = s3_actions_read(),
resource = c(bucket_arn(bucket), bucket_arn(bucket, objects = "*"))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.