o

com.micronautics.aws

BucketPolicy

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
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BucketPolicy
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def allowUserEverythingStatement(bucket: Bucket)(implicit iamClient: AmazonIdentityManagement): Statement
  2. def arnUser(implicit iamClient: AmazonIdentityManagement): Try[String]

    The implicit AmazonIdentityManagementClient instance determines the AIM user based on the AWS access key ID in the implicit AWSCredentials instance in scope.

    The implicit AmazonIdentityManagementClient instance determines the AIM user based on the AWS access key ID in the implicit AWSCredentials instance in scope.

    returns

    typical value: Success("arn:aws:iam::031372724784:root")

  3. def createBucket(bucketName: String)(implicit s3: S3, iamClient: AmazonIdentityManagement): Bucket
  4. def principalUser(implicit iamClient: AmazonIdentityManagement): Try[Principal]

    returns

    Try[Principal] for arnUser. typical principalUser.getId value: arn:aws:iam::031372724784:root

  5. 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