This is a repository for useful methods and circe decoders. These are all published as separate packages under the uk.gov.nationalarchives
package.
downloadFiles
Will download a file to S3 to a specified path or to a path matching the S3 key.upload
Will upload the file from a specified path to the supplied bucket and key.generateGetObjectSignedUrl
Will generate a presigned url.
s3
The synchronousS3Client
which takes an endpoint as an argument.s3Async
An asyncS3AsyncClient
which takes an endpoint as an argument.
decodeS3EventFromSqs
Uses custom circe decoders to decode the Java classes from the AWS SDK to Scala case classes.
These are the list of custom circe decoders for decoding the AWS Java classes.
send
Will send a message to an SQS queue.delete
Will delete a message from an SQS queuemakeMessageVisible
Will make a message visible again. This is useful for retries on lambda errors.
sqs
A synchronousSqsClient
which takes an endpoint as an argument.
sendEmail
Will send an email based on the parameters in theEmail
case class.
ses
A synchronousSesClient
client which takes an endpoint as an argument.
startImageScan
Will start an image scan for a specified image.imageScanFindings
Will get the findings of a scan.describeImages
Will list the images for a given repository name.listRepositories
Will list all repositories for an account.
ecr
An asyncEcrAsyncClient
client which takes an endpoint as an argument.
publish
Will send a message to the specified topic
sns
A synchronousSnsClient
client which takes an endpoint as an argument.
sendTaskSuccessRequest
Will send a custom json task success request for the provided task token.sendTaskFailureRequest
Will send a failure request for the provided task token with a failure cause.sendTaskHeartbeat
Will send a heartbeat for step function steps which are using it.startExecution
Will start a step function execution.
sfnAsyncClient
An asyncSfnAsyncClient
client which takes an endpoint as an argument.
decryptValue
will decrypt the encrypted value provided. If the decryption fails, the original value is returned.
kms
A synchronousKmsClient
client which takes an endpoint as an argument.
Run sbt package publishLocal
to publish a local version of all of these libraries in the ~/.ivy2/local/uk.gov.nationalarchives/
directory.
The deploy.yml
GitHub action calls sbt release
which releases all the modules as a separate package. It does not release the root tdr-aws-utils
package as this is now empty.