可以使用以下代码示例来创建一个面向互联网的AWS NLB:
import boto3
elb_client = boto3.client('elbv2')
response = elb_client.create_load_balancer( Name='my-load-balancer', Subnets=['subnet-12345678', 'subnet-23456789'], Type='network', Scheme='internet-facing', # 设置方案为面向互联网 Tags=[ { 'Key': 'Name', 'Value': 'my-load-balancer' }, ] )
print(response)
下一篇:AWSNode.js编译器出现“Ineffectivemark-compactsnearheaplimitAllocationfailed-JavaScriptheapoutofmemory”错误。