使用参数从 SNS 调用 Lambda 函数?

Invoke Lambda function from SNS with parameters?

我有一个 ASG,想使用 SNS 将新的 EC2 的 ID 发送到 Lambda 函数,这可能吗?

看这个例子Invoking AWS Lambda functions via Amazon SNS

When a message is published to an SNS topic that has a Lambda function subscribed to it, the Lambda function is invoked with the payload of the published message. The Lambda function receives this message payload as an input parameter and can use information contained in the payload to manipulate it, publish it to another set of SNS topics, or send the message to other AWS services.

该示例还讨论了如何提取有效载荷。您的 EC2 实例 ID 将成为 SNS 负载的一部分。