3 回答
- 最新
- 投票最多
- 评论最多
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/
已回答 9 个月前
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.
已回答 9 个月前
相关内容
- AWS 官方已更新 1 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前
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.