Comments (5)
Thanks for the explanation @yairsappir! moto >= 5.0.10.dev23
now also returns the Target.NotRegistered
in that scenario, so as far as I can tell it behaves exactly like AWS.
I've closes this for now, but feel free to open a new issue if you run into any (other) problems.
from moto.
Hi @yairsappir, thanks for raising this. We currently just delete targets when deregistering them, but it sounds like we should still keep track of them. Marking it as a bug to improve this area.
from moto.
Hi and thanks for the response!
Just wanted to add that when calling describe_target_health
on a target that doesn't exist using the regular boto3 api results in a unused
state with reason Target.NotRegistered
.
So I believe that unused
should be returned rather than unavailable
in this scenario.
from moto.
Hi @yairsappir, moto >= 5.0.10.dev18 now returns the correct state for deregistered instances.
when calling describe_target_health on a target that doesn't exist using the regular boto3 api results in a unused state with reason Target.NotRegistered.
When I try to register an unknown EC2 instance, boto3 already throws an error that the instance doesn't exist. Or are you using different targets, like ALB's or Lambda Functions?
from moto.
Hi @bblommers ,
Thank you for looking at this!
I used this code:
import boto3
elbv2_client = boto3.client('elbv2','us-east-1')
elbv2_client.describe_target_health(TargetGroupArn=target_group_arn,Targets=[{'Id':'i-12345678901234567'}])
Where target_group_arn
is a real target group for ec2, and i-12345678901234567
is used as-is.
This also returns State: unused
with Reason: Target.NotRegistered
Not sure if that is a bug on AWS side or not though..
from moto.
Related Issues (20)
- EC2 instance with predefined IP and SubnetId: network interface stays around after instance termination HOT 1
- Incorrect behavior of SageMaker Client Search Method HOT 1
- What’s the master branch‘s actual current package version? HOT 1
- Large size on disk when installing for just one service HOT 2
- The security token included in the request is invalid for glue HOT 1
- ec2.describe_security_group_rules bad output response for IPv4, IPv6, Prefix Lists, Security Groups targets and overlapping port/protocols HOT 1
- implementation_coverage.py script misses covered API calls HOT 1
- Cryptographic API Misuse Vulnerability HOT 1
- Directory Service: DescribeDirectories expects LaunchTime to be a JSON Number, got string instead HOT 2
- No ValidationException raised when calling DDB UpdateItem operation with an empty ExpressionAttributeValues HOT 1
- Sagemaker runtime: InvokeEndpointAsync does not provide FailureLocation parameter HOT 3
- Organizations `create_account()` should create an IAM role in the new "account" HOT 2
- API GatewayV2 GetApi with an empty string: not implemented HOT 2
- Support for QLDB
- The filter 'kms-key-id' for DescribeSnapshots has not been implemented in Moto yet HOT 1
- Autoscaling groups do not pass launch template to EC2 instances. HOT 3
- update_autoscaling_group returns KeyError instead of ValidationError when ASG name is not found HOT 2
- rds restore_db_instance_to_point_in_time has KeyError bug if run twice HOT 1
- DyanmoDB: empty update expression in `update_item` raises the wrong exception
- Bug in RDS modify_db_instance with CloudwatchLogsExportConfiguration HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moto.