Added lambda trigger

This commit is contained in:
2024-04-18 19:09:46 +02:00
parent 4c85bbeb90
commit 0f116c4839
5 changed files with 60 additions and 5 deletions

View File

@@ -1,12 +1,23 @@
import boto3
s3_client = None
s3_bucket = None
def lambda_handler(event, context):
global s3_client
global s3_bucket
if s3_client is None:
s3_client = boto3.client('s3')
s3_bucket = s3_client.Bucket('standout-data')
return {
"statusCode": 301,
"headers": {
"Cache-Control": "no-cache",
#"Location": "https://standout-data.s3.eu-west-1.amazonaws.com/funnel-rotation-circles.jpg"
#"Location": "https://www.instagram.com/cosebrutteimpaginatebelle/?e=ec081328-9f83-4745-b6b7-aed1e87963df&g=5"
"Location": "https://www.instagram.com/cosebrutteimpaginatebelle/?e=ec081328-9f83-4745-b6b7-aed1e87963df&g=5"
#"Location": "https://standout-data.s3.eu-west-1.amazonaws.com/Meter-Seneca.pdf"
#"Location": "https://standout-data.s3.eu-west-1.amazonaws.com/Lisa+Varano.vcf"
}