Empty CSV files?
jpolzfuss opened this issue · 2 comments
Hello!
All the generated CSVs are always empty, except for the "_timestamp__Classic_Platform_Status.csv" that lists this:
us-east-1, Disabled
us-west-1, Disabled
us-west-2, Disabled
eu-west-1, Disabled
ap-southeast-1, Disabled
ap-southeast-2, Disabled
ap-northeast-1, Disabled
sa-east-1, Disabled
Also, the error text file is empty.
I tried with
- python3 py-Classic-Resource-Finder.py -p default
- python3 py-Classic-Resource-Finder.py -p "default"
- python3 py-Classic-Resource-Finder.py -p 'default'
- python3 py-Classic-Resource-Finder.py
But the result is always the same (empty files except for "_Classic_Platform_Status.csv"). But this is strange as in the AWS account, there are at least four "classic load balancers" in eu-west-1.
Any ideas? Thanks!
(The files are generated in a folder with the AWS account id as name. And on the CLI, I can still do "aws ec2 describe-volume-status", "aws s3 ls", "aws ec2 describe-vpc-classic-link", ... . So there's nothing fishy with my cli.)
Hello Jörg,
Thank you for posting. Based on your output, it sounds like you are running Classic Load Balancers inside a VPC. As part of the EC2 Classic retirement, we are only retiring Classic Load Balancers not running in a VPC (thus running in EC2-Classic). Classic Load Balancers which are running in a VPC are not currently being retired as part of this.
You can confirm that these Classic Load Balancers are running in a VPC by running aws elb describe-load-balancers
in the AWS CLI.
If you see an output like this your Classic Load Balancer is running in a VPC and the script ran correctly (Note VPCId
value):
[cloudshell-user@ip-10-0-127-234 ~]$ aws elb describe-load-balancers
{
"LoadBalancerDescriptions": [
{
"LoadBalancerName": "VPC-CLB",
"DNSName": "VPC-CLB-484*******.us-west-2.elb.amazonaws.com",
"CanonicalHostedZoneName": "VPC-CLB-48*******.us-west-2.elb.amazonaws.com",
"CanonicalHostedZoneNameID": "Z1H*******",
"ListenerDescriptions": [
{
"Listener": {
"Protocol": "HTTP",
"LoadBalancerPort": 80,
"InstanceProtocol": "HTTP",
"InstancePort": 80
},
"PolicyNames": []
}
],
"Policies": {
"AppCookieStickinessPolicies": [],
"LBCookieStickinessPolicies": [],
"OtherPolicies": []
},
"BackendServerDescriptions": [],
"AvailabilityZones": [
"us-west-2b",
"us-west-2a"
],
"Subnets": [
"subnet-f6******",
"subnet-fe******"
],
"VPCId": "vpc-d9******",
"Instances": [],
"HealthCheck": {
"Target": "HTTP:80/index.html",
"Interval": 30,
"Timeout": 5,
"UnhealthyThreshold": 2,
"HealthyThreshold": 10
},
"SourceSecurityGroup": {
"OwnerAlias": "13************",
"GroupName": "Closed"
},
"SecurityGroups": [
"sg-07**************"
],
"CreatedTime": "2021-03-12T19:45:29.910000+00:00",
"Scheme": "internet-facing"
}
]
}
If, however, you see this, where there is no VPCId
key value pair, then something went wrong and the Classic Load Balancers are running in EC2-Classic. If that is the case for some reason, please reopen this, so we can investigate further.
[cloudshell-user@ip-10-0-127-234 ~]$ aws elb describe-load-balancers
{
"LoadBalancerDescriptions": [
{
"LoadBalancerName": "Classic-CLB",
"DNSName": "Classic-CLB-12******.us-west-2.elb.amazonaws.com",
"CanonicalHostedZoneName": "Classic-CLB-12******.us-west-2.elb.amazonaws.com",
"CanonicalHostedZoneNameID": "Z1H******",
"ListenerDescriptions": [
{
"Listener": {
"Protocol": "HTTP",
"LoadBalancerPort": 80,
"InstanceProtocol": "HTTP",
"InstancePort": 80
},
"PolicyNames": []
}
],
"Policies": {
"AppCookieStickinessPolicies": [],
"LBCookieStickinessPolicies": [],
"OtherPolicies": []
},
"BackendServerDescriptions": [],
"AvailabilityZones": [
"us-west-2a"
],
"Subnets": [],
"Instances": [],
"HealthCheck": {
"Target": "HTTP:80/index.html",
"Interval": 30,
"Timeout": 5,
"UnhealthyThreshold": 2,
"HealthyThreshold": 10
},
"SourceSecurityGroup": {
"OwnerAlias": "amazon-elb",
"GroupName": "amazon-elb-sg"
},
"SecurityGroups": [],
"CreatedTime": "2021-03-12T19:44:18.430000+00:00",
"Scheme": "internet-facing"
}
]
}
You're correct - I've got a non-empty VPCId for all the load-balancers. Thanks a lot!