lambda function

0

how to run lambda function to check the file exist or not in EC2 instance please find the solution of this query

已提問 2 年前檢視次數 260 次
1 個回答
2

Are you trying to run a command against a Linux instance? If so, you can try using an SSH library for your runtime such as python to connect through SSH and run a command. This is a bit of an old example but comes from AWS blog. Please use it as a reference. An easier option is using Systems Manager's Run Command. You can manage your EC2 instance through Systems Manager and then you can run a command such as AWS-RunShellScript to remotely run a command. If you want to get an output from the command within Lambda, you can use a SendCommand API action to do the same. This getting started guide, how to run commands on an EC2 instance with Systems Manager, walks through the process.

AWS
Taka_M
已回答 2 年前
profile pictureAWS
專家
已審閱 2 年前

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

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

回答問題指南