Last active
December 25, 2018 06:31
-
-
Save krdlab/05bbe7e3037242ed488d209c475c75b6 to your computer and use it in GitHub Desktop.
Python boto3 の S3 Client サンプル
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
from botocore.exceptions import ClientError | |
client = boto3.client('s3') | |
try: | |
client.get_bucket_cors(Bucket='unknown-bucket') | |
except ClientError as e: | |
print e | |
try: | |
client.get_bucket_cors(Bucket='no-cors-config-bucket') | |
except ClientError as e: | |
print e |
Author
krdlab
commented
Dec 25, 2018
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment