3 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
1
Why are you using Lambda in this case? I would send the S3 notification to SQS and have a process polling the queue on the EC2 instance. When it receives a new message, it download the file and process it.
0
Try Mountpoint for Amazon S3 - https://aws.amazon.com/blogs/aws/mountpoint-for-amazon-s3-generally-available-and-ready-for-production-workloads/
répondu il y a 9 mois
Mountpoint only support Linux today. You could use WSL or a container to run on Windows.
0
I implemented similar solution in the past using S3 --> EventBridge --> Lambda function which invoked a SSM command
Example:
bucket_name = event['bucket_name']
s3_object = event['object_key']
instance_id = event['instance_id']
destination_path = event['destination']
command_string = f"Copy-S3Object -BucketName {bucket_name} -Key {s3_object} -LocalFile {destination_path}\{s3_object}"
cmd_id = ssm_client.send_command(
InstanceIds=[instance_id],
DocumentName="AWS-RunPowerShellScript",
Parameters={"commands": [command_string]},
CloudWatchOutputConfig={"CloudWatchOutputEnabled": True}
)
You will also need to verify that the EC2 instance has the proper IAM permissions assigned to access the S3 bucket and objects as well as the proper permissions for SSM management.
répondu il y a 9 mois
Contenus pertinents
- demandé il y a un an
- demandé il y a 7 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 4 mois
- AWS OFFICIELA mis à jour il y a 2 ans
Thank you for your response. I was thinking of using Lambda to perform the above action and then continue to operate Window Server with Run Command by lambda.