====== MA-E3xx for AWS ====== boto3 を追加して、直接 S3 などへアクセス可能にしたテスト版。 \\ ^ File ^ Stat ^ SHA1SUM ^ Note | |{{:download_software:mae3xx:mae3xx_aws:mae3xx_trusty_aws_v2_9_3alpha1.img|}}|2018/09/06 14:49 70.4 MB|807d2ee8f5243deb653f9f736a924cb6f34966b6|v2.9.3α1 ベース| \\ ===== サンプル ===== [[https://localstack.cloud/|LocalStack]] 相手に動作することを確認しています。 {{:download_software:mae3xx:mae3xx_aws:local_stack_01.png|LocalStach Dashboard}} ~$ ipython3 Python 3.4.3 (default, Nov 28 2017, 17:03:36) Type "copyright", "credits" or "license" for more information. IPython 1.2.1 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]: import boto3 In [2]: client=boto3.client('s3', endpoint_url='http://192.168.103.164:4572', aws_access_key_id='hogehoge', aws_secret_access_key='fugafuga', region_name='us-east-1') In [3]: client.list_buckets() Out[3]: {'Buckets': [{'CreationDate': datetime.datetime(2006, 2, 3, 16, 45, 9, tzinfo=tzutc()), 'Name': 'from_MAE3xx'}], 'Owner': {'DisplayName': 'webfile', 'ID': 'bcaf1ffd86f41161ca5fb16fd081034f'}, 'ResponseMetadata': {'HTTPHeaders': {'access-control-allow-headers': 'authorization,content-type,content-md5,x-amz-content-sha256,x-amz-date,x-amz-security-token,x-amz-user-agent', 'access-control-allow-methods': 'HEAD,GET,PUT,POST,DELETE,OPTIONS,PATCH', 'access-control-allow-origin': '*', 'content-length': '353', 'content-type': 'text/html; charset=utf-8', 'date': 'Thu, 06 Sep 2018 06:03:42 GMT, Thu, 06 Sep 2018 06:03:42 GMT', 'server': 'BaseHTTP/0.3 Python/2.7.13, Werkzeug/0.12.2 Python/2.7.13'}, 'HTTPStatusCode': 200, 'RetryAttempts': 0}}