This is a repository for useful methods and circe decoders. These are all published as separate packages under the uk.gov.nationalarchives package.
downloadFilesWill download a file to S3 to a specified path or to a path matching the S3 key.uploadWill upload the file from a specified path to the supplied bucket and key.generateGetObjectSignedUrlWill generate a presigned url.
s3The synchronousS3Clientwhich takes an endpoint as an argument.s3AsyncAn asyncS3AsyncClientwhich takes an endpoint as an argument.
decodeS3EventFromSqsUses 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.
sendWill send a message to an SQS queue.deleteWill delete a message from an SQS queuemakeMessageVisibleWill make a message visible again. This is useful for retries on lambda errors.
sqsA synchronousSqsClientwhich takes an endpoint as an argument.
sendEmailWill send an email based on the parameters in theEmailcase class.
sesA synchronousSesClientclient which takes an endpoint as an argument.
startImageScanWill start an image scan for a specified image.imageScanFindingsWill get the findings of a scan.describeImagesWill list the images for a given repository name.listRepositoriesWill list all repositories for an account.
ecrAn asyncEcrAsyncClientclient which takes an endpoint as an argument.
publishWill send a message to the specified topic
snsA synchronousSnsClientclient which takes an endpoint as an argument.
sendTaskSuccessRequestWill send a custom json task success request for the provided task token.sendTaskFailureRequestWill send a failure request for the provided task token with a failure cause.sendTaskHeartbeatWill send a heartbeat for step function steps which are using it.startExecutionWill start a step function execution.
sfnAsyncClientAn asyncSfnAsyncClientclient which takes an endpoint as an argument.
decryptValue will decrypt the encrypted value provided. If the decryption fails, the original value is returned.
kmsA synchronousKmsClientclient which takes an endpoint as an argument.
getParameterValue will retrieve the value associated with the given parameter name.
ssmA synchronousSsmClientclient 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.