[英]Describe listener rule count using Boto3
我需要列出侦听器规则计数,但我仍然得到 output 作为null没有任何错误。我的完整项目从在弹性负载平衡器上创建侦听器规则时收到 email 通知。
import json
import boto3
def lambda_handler(event, context):
client = boto3.client('elbv2')
response = client.describe_listeners(
ListenerArns=[
'arn:aws:elasticloadbalancing:ap-south-1:my_alb_listener',
],
)
print('response')
这是我的代码的 output
回复 null
响应为 null,因为您的缩进不正确并且您没有从处理程序返回任何内容。 它应该是:
import json
import boto3
def lambda_handler(event, context):
client = boto3.client('elbv2')
response = client.describe_listeners(
ListenerArns=[
'arn:aws:elasticloadbalancing:ap-south-1:my_alb_listener',
],
)
return response
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.