0
List images in ECR
One script reply has been approved by the moderators Verified
Created by adam186 730 days ago Viewed 9427 times
0
Submitted by adam186 Python3
Verified 730 days ago
1
import boto3
2

3
aws = dict
4

5
def main(aws: aws, ecr: str = "windmill-labs/windmill"):
6

7
    session = boto3.session.Session(
8
        aws_access_key_id=aws["awsAccessKeyId"], 
9
        aws_secret_access_key=aws["awsSecretAccessKey"],
10
        region_name=aws["region"]
11
    )
12

13
    client = boto3.client("ecr")
14
    return client.list_images(
15
        repositoryName=ecr,
16
        maxResults=1000,
17
    )
18

19