You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lambda function is triggered when there is an IP address change. However, it is unable to update the target group IP. There is not much in the lambda logs. Doesn't look like the function is attempting to update the target group as there is no such event in the cloud trail. It was able to create the cloudwatch log group though.
Debug was helpful as it indicated that there wasn't any response for the API call. Issue was actually with the API endpoint reachability.
2022-10-09 19:00:11,394 urllib3.connectionpool [DEBUG] Starting new HTTPS connection (1): ec2.us-east-1.amazonaws.com:443
But there is one issue I wanted to point out. If the registered target is from a different VPC then the client.register_targets() is not working as it is expecting Availability zone information.
[ERROR] ClientError: An error occurred (ValidationError) when calling the RegisterTargets operation: The Availability Zone is required for IP address '10.10.2.19' because it is not in the VPC
As per the SDK documentation, this is a required parameter and I had to pass the value 'all' to the function to get around it.
_AvailabilityZone (string) --
An Availability Zone or all . This determines whether the target receives traffic from the load balancer nodes in the specified Availability Zone or from all enabled Availability Zones for the load balancer.
This parameter is not supported if the target type of the target group is instance or alb .
If the target type is ip and the IP address is in a subnet of the VPC for the target group, the Availability Zone is automatically detected and this parameter is optional. If the IP address is outside the VPC, this parameter is required.
With an Application Load Balancer, if the target type is ip and the IP address is outside the VPC for the target group, the only supported value is all .
If the target type is lambda , this parameter is optional and the only supported value is all ._
Lambda function is triggered when there is an IP address change. However, it is unable to update the target group IP. There is not much in the lambda logs. Doesn't look like the function is attempting to update the target group as there is no such event in the cloud trail. It was able to create the cloudwatch log group though.
2022-10-08T18:17:26.269Z
e3f5e74a-1250-4a5a-81c0-93cd9cea7040
2022/10/08/[$LATEST]5da1d8ac075e45cdb2c4b4e6c4753921
3005.74
3000.0
128
26
@billedDuration
3000.0
@duration
3005.74
@ingestionTime
1665253046300
@log
accountnumbermasked:/aws/lambda/NLBAutoUpdate-nlbstack
@logstream
2022/10/08/[$LATEST]5da1d8ac075e45cdb2c4b4e6c4753921
@maxMemoryUsed
2.6E7
@memorySize
1.28E8
@message
REPORT RequestId: e3f5e74a-1250-4a5a-81c0-93cd9cea7040 Duration: 3005.74 ms Billed Duration: 3000 ms Memory Size: 128 MB Max Memory Used: 26 MB
XRAY TraceId: 1-6341beb3-0a90f9187ddad6591d5bcefb SegmentId: 405f40203b8095cc Sampled: true
@requestid
e3f5e74a-1250-4a5a-81c0-93cd9cea7040
@timestamp
1665253046269
@type
REPORT
@xraySegmentId
405f40203b8095cc
@xrayTraceId
1-6341beb3-0a90f9187ddad6591d5bcefb
The text was updated successfully, but these errors were encountered: