Skip to content

Instantly share code, notes, and snippets.

@samjarrett
samjarrett / paginate.py
Created June 11, 2021 12:51
boto paginators the right way
def paginate(method, **kwargs):
client = method.__self__
paginator = client.get_paginator(method.__name__)
for page in paginator.paginate(**kwargs).result_key_iters():
for result in page:
yield result
# usage:
import boto3
@iann0036
iann0036 / gist:b473bbb3097c5f4c656ed3d07b4d2222
Last active June 10, 2025 09:45
List of expensive / long-term effect AWS IAM actions
acm-pca:CreateCertificateAuthority
aws-marketplace:AcceptAgreementApprovalRequest
aws-marketplace:Subscribe
backup:PutBackupVaultLockConfiguration
bedrock:CreateProvisionedModelThroughput
bedrock:UpdateProvisionedModelThroughput
devicefarm:PurchaseOffering
dynamodb:PurchaseReservedCapacityOfferings
ec2:ModifyReservedInstances
ec2:PurchaseCapacityBlock