package aws
The aws
package contains idiomatic Scala facades for CloudFront, ElasticTranscoder, IAM, Lambda, Polly,
Rekognizer, Route53, SNS and SQS.
- Source
- package.scala
- Alphabetic
- By Inheritance
- aws
- SQSImplicits
- SNSImplicits
- S3Implicits
- IAMImplicits
- ETImplicits
- CFImplicits
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- sealed abstract final class AclEnum extends Enum[AclEnum]
-
case class
Arn
(arnString: String) extends Product with Serializable
- arnString
Typical value:
arn:aws:sns:us-east-1:031372724784:transcoderComplete
- trait CFImplicits extends AnyRef
-
implicit
class
RichDistributionSummary
extends AnyRef
- Definition Classes
- CFImplicits
- class CloudFront extends CFImplicits with S3Implicits
- trait CloudFrontAlias extends AnyRef
- case class Credentials (awsAccountName: String, accessKey: String, secretKey: String) extends BasicAWSCredentials with Product with Serializable
- trait ETImplicits extends AnyRef
-
implicit
class
RichPipeline
extends AnyRef
- Definition Classes
- ETImplicits
- class ElasticTranscoder extends AnyRef
- class ExceptTrace extends Exception with NoStackTrace
- class IAM extends AnyRef
- trait IAMImplicits extends AnyRef
-
implicit
class
RichIAMUser
extends AnyRef
- Definition Classes
- IAMImplicits
- class Lambda extends AnyRef
- trait LambdaImplicits extends AnyRef
- class Polly extends AnyRef
- trait PollyImplicits extends AnyRef
- class Rekognition extends AnyRef
- trait RekognitionImplicits extends AnyRef
- implicit class RichException extends AnyRef
- class Route53 extends AnyRef
-
class
S3
extends AnyRef
Optimized for read-mostly AWS S3 buckets; uses caching to speed access.
Optimized for read-mostly AWS S3 buckets; uses caching to speed access. To clear the caches after a invoking method that caches its response, either the app must be restarted or the
clearCaches
method must be called. Methods that are cached are denoted by cached.When uploading, any leading slashes for keys are removed because when AWS S3 is enabled for a web site, S3 adds a leading slash.
Keys of assets that were uploaded by other clients might start with leading slashes, or a dash; those assets can not be fetched by web browsers.
When web site access to an S3 bucket is enabled, AWS content is accessed by paths constructed by concatenating the URL, a slash (/), and the keyed data. The keys must therefore consist of relative paths (relative directory name followed by a file name), and must not start with a leading slash.
awslib_scala
stores each file name (referred to by AWS as a key) without a leading slash. For example, assuming that the default file name isindex.html
, thenhttp://domain.com
andhttp://domain.com/
are translated tohttp://domain.com/index.html
.As another example, the key for a file in a directory called
<WEBROOT>/blah/ick/yuck.html
is defined asblah/ick/yuck.html
.AWS does not respect the
last-modified
metadata provided when uploading; it uses the upload timestamp instead. After uploading, thelast-modified
timestamp of the uploaded file is read and applied to the local copy of the file so the timestamps match.Java on Windows does not handle
last-modified
properly, so the creation date is set to thelast-modified
date for files (Windows only).For each directory, AWS creates a file of the same name, with the suffix
_$folder$
. If one of those files are deleted, the associated directory becomes unreachable. Don't mess with them. These hidden files are ignored byawslib_scala
; users never see them because they are for AWS S3 internal use only. - trait S3Implicits extends AnyRef
-
implicit
class
RichBucket
extends AnyRef
- Definition Classes
- S3Implicits
-
implicit
class
RichBucketIAM
extends AnyRef
- Definition Classes
- S3Implicits
- class SNS extends AnyRef
- trait SNSImplicits extends AnyRef
-
implicit
class
RichString
extends AnyRef
- Definition Classes
- SNSImplicits
-
implicit
class
RichTopic
extends AnyRef
- Definition Classes
- SNSImplicits
- class SQS extends AnyRef
- trait SQSImplicits extends AnyRef
- case class StaticCFAlias (cname: String) extends CloudFrontAlias with Product with Serializable
- case class StreamingCFAlias (cname: String) extends CloudFrontAlias with Product with Serializable
- case class Subscription (arn: Arn) extends Product with Serializable
-
class
UploadPostV2
extends AnyRef
Heavy computation for preparing upload, mostly having to do with security.
Heavy computation for preparing upload, mostly having to do with security. The AIM user on whose behalf the upload is performed is determined from the AWS access key ID in the implicit
AWSCredentials
instance.
Value Members
- lazy val awsCredentials: AWSCredentials
- def guessContentType(key: String): String
-
def
jsonPrettyPrint(awsObject: AnyRef): String
Helpful for debugging AWS requests and responses
- def removeOuterParens(string: String): String
-
def
uuid: String
UUID / GUID generator
-
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.
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.
-
object
RichDistribution
- Definition Classes
- CFImplicits
- object CloudFront
- object ElasticTranscoder
- object ExceptTrace extends Serializable
- object IAM
- object Lambda
- object Polly
- object Rekognition
- object S3
- object SNS
- object SQS
-
object
UploadPostV2
extends S3Implicits with CFImplicits
The implicit
AmazonIdentityManagementClient
instance determines the AIM user based on the AWS access key ID in the implicitAWSCredentials
instance in scope.