Run python file, it is on the Windows EC2 instance when lambda triggering

0

I am currently working on a client project that involves a Windows EC2 instance and a Lambda function on the same AWS account.

My task is to ensure that when the Lambda function is triggered, a Python file on the EC2 instance is executed, and all output can be viewed through CloudWatch logs using Python.

Is anyone here to guide me?

已提問 8 個月前檢視次數 366 次
1 個回答
0

One way I can think to do this is simply to make the lambda function place a message into an SQS Queue. Then from the Windows instance, consume messages from the queue using one of our SDKs (such as the .NET SDK - https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/ReceiveMessage.html).

On receiving the appropriate message, invoke the Python script on your Windows machine. You can use the Boto3 SDK to send the output logs to CloudWatch logs.

AWS
專家
已回答 8 個月前
profile pictureAWS
專家
已審閱 8 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南