import json
import boto3
s3 = boto3.client("s3")
bucket = "sksmsansdj"
key = "test/target.txt"
file_name = "/tmp/target.txt"
def lambda_handler(event, context):
s3.download_file(bucket, key, file_name)
with open(file_name, "a") as f:
pass
s3.upload_file(file_name, bucket, key)
return json.dumps({"success": "OK!"})