Expand description
Anonymiser lambda
This lambda is used to convert incoming scripts from the TRE production bucket into anonymised packages
Given the following input:
{
"parameters": {
"s3Bucket": "input-bucket",
"s3Key": "TRE-TDR-2023-ABC.tar.gz"
}
}
The lambda will:
- Download the file from S3 to local disk
- Anonymise it using the anonymise library
- Upload it to S3 using the
OUTPUT_BUCKET
environment variable - Send the SQS message to the queue specified in the
OUTPUT_QUEUE
environment variable
Structsยง
- Message
Body ๐ - The bucket and key for the file we are processing
- S3Details ๐
Functionsยง
- aws_
config ๐ - Creates an AWS SDK config object
- create_
s3_ ๐client - Creates an S3 client
- create_
sqs_ ๐client - Creates an SQS client
- download ๐
- Downloads the specified file
- process_
record - Processes the SQS message.
- upload ๐
- Uploads the specified file