object BucketPolicy
Convenience methods which created a bucket with the given bucketName, enables web site and CORS, and sets the bucket policy so the owner can upload. You may want to write similar code that generates a policy that follows AWS best practices instead.
- Source
- BucketPolicy.scala
- Alphabetic
- By Inheritance
- BucketPolicy
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
- def allowUserEverythingStatement(bucket: Bucket)(implicit iamClient: AmazonIdentityManagement): Statement
-
def
arnUser(implicit iamClient: AmazonIdentityManagement): Try[String]
The implicit
AmazonIdentityManagementClient
instance determines the AIM user based on the AWS access key ID in the implicitAWSCredentials
instance in scope.The implicit
AmazonIdentityManagementClient
instance determines the AIM user based on the AWS access key ID in the implicitAWSCredentials
instance in scope.- returns
typical value: Success("arn:aws:iam::031372724784:root")
- def createBucket(bucketName: String)(implicit s3: S3, iamClient: AmazonIdentityManagement): Bucket
-
def
principalUser(implicit iamClient: AmazonIdentityManagement): Try[Principal]
- returns
Try[Principal] for
arnUser
. typical principalUser.getId value: arn:aws:iam::031372724784:root
-
def
setPolicy(bucket: Bucket, statements: List[Statement])(implicit s3: S3): Bucket
This method is idempotent Side effect: sets policy for given AWS S3 upload bucket