I am using boto3, for list all snapshots. But when I use function ec2.snapshots.all(), and then try iterate with a for, it's not working.
from __future__ import print_function from boto3 import resource REGION = "us-east-1" def lambda_handler(event, context): ec2 = resource("ec2", region_name=REGION) all_snapshots = ec2.snapshots.all() for snapshot in all_snapshots: print("SnapshotIteration")
The result is the next:
{ "errorMessage": "2017-03-07T00:08:56.583Z 3faed105-02ca-11e7-b637-cfb921e4e3cc Task timed out after 3.00 seconds" }