2016-10-19 3 views
1

私はPostman AWS Signatureを使用してS3サービスに接続し、そのバケット内のすべてのバケット、フォルダを取得できました。郵便配達員経由でAWS S3にバケットを作成する方法

私が郵便配達員で行うことができるリクエストのリストです。

List of all bucket inside the specific region: GET https://s3-us-west-2.amazonaws.com/ 
List of all objects/folders inside the bucket: GET https://s3-us-west-2.amazonaws.com/<bucket name> 
Delete the bucket/file (when it's empty):  DELETE https://s3-us-west-2.amazonaws.com/<bucket name>/[<file name>] 
Create the file into the bucket:    PUT https://s3-us-west-2.amazonaws.com/<bucket name>/[<file name>][<folder name>/] 

バケット(PUTメソッド)を作成したいときは、エラーメッセージです。

The unspecified location constraint is incompatible for the region specific endpoint this request was sent to 

郵便配達員経由でバケツを作成するには前もって感謝します。

答えて

0

API呼び出しを通じてバケットを作成するためのAWSによってドキュメントでは、リクエストのボディで場所の制約を提供することができます言及:

<CreateBucketConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> 
    <LocationConstraint>YourBucketRegion</LocationConstraint> 
</CreateBucketConfiguration> 

てみあなたが選んだの地域でそれを追加:

PUT/HTTP/1.1 
Host: BucketName.s3.amazonaws.com 
Content-Length: length 
Date: date 
Authorization: authorization string (see Authenticating Requests (AWS Signature Version 
    4)) 

<CreateBucketConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> 
<LocationConstraint>BucketRegion</LocationConstraint> 
</CreateBucketConfiguration> 

出典:ここ

Valid Values: [ us-west-1 | us-west-2 | EU or eu-west-1 | 
eu-central-1 | ap-south-1 | ap-southeast-1 | ap-southeast-2 | 
ap-northeast-1 | ap-northeast-2 | sa-east-1 | us-east-2] 
は完全な構文であります

+0

ありがとう、助けてくれました –

+0

答えがあなたのために働いていれば、似たような問題を抱えている人も解決策を見つけることができるように、それを合格とマークしてください。 –

関連する問題