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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ