Skip to content

Commit

Permalink
paginate over instance types
Browse files Browse the repository at this point in the history
  • Loading branch information
daroczig committed Jan 2, 2024
1 parent 0629e08 commit 53f7696
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sc_crawler/vendors/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
@cachier(stale_after=timedelta(days=3))
def describe_instance_types(region):
ec2 = boto3.client("ec2", region_name=region)
return ec2.describe_instance_types()["InstanceTypes"]
pages = ec2.get_paginator("describe_instance_types")
pages = pages.paginate().build_full_result()
return pages["InstanceTypes"]


@cachier(stale_after=timedelta(days=3))
Expand Down

0 comments on commit 53f7696

Please sign in to comment.