24 lines
494 B
Python
Executable File
24 lines
494 B
Python
Executable File
#!/usr/bin/env python3
|
|
r"""
|
|
Documentation
|
|
|
|
License: This program is released under the MIT License
|
|
"""
|
|
|
|
# Imports
|
|
import boto3
|
|
|
|
|
|
# Main function
|
|
def main() -> None:
|
|
client = boto3.client('cloudfront')
|
|
response = client.list_distributions()
|
|
|
|
print("Distribution, Alias, OriginId")
|
|
for i in response['DistributionList']['Items']:
|
|
print(f'{i["Id"]}, {i["Aliases"]["Items"][0]}, {i["Origins"]["Items"][0]["Id"]}')
|
|
|
|
# Call main function
|
|
if __name__ == '__main__':
|
|
main()
|