1 Answer
- Newest
- Most votes
- Most comments
0
To make it work I did the following:
- Changed POST into PUT
- In postman set the body to xml
- Changed the URL from {{bucketName}}.s3.amazonaws.com to {{bucketName}}.s3.{{AWSRegion}}.amazonaws.com
Status was 200 OK
{
"info": {
"_postman_id": "d914a614-3c17-46e9-9da6-81616e7c42ae",
"name": "AWS S3 Bucket Ops",
"description": "This collection creates an S3 Bucket",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "74***52"
},
"item": {
"name": "CreateBucket",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "<CreateBucketConfiguration xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\"> \r\n <LocationConstraint>eu-west-3</LocationConstraint> \r\n</CreateBucketConfiguration>\r\n",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{bucketName}}.s3.{{AWSRegion}}.amazonaws.com",
"host": [
"{{bucketName}}",
"s3",
"{{AWSRegion}}",
"amazonaws",
"com"
]
}
},
"response": []
}
],
"auth": {
"type": "awsv4",
"awsv4": [
{
"key": "service",
"value": "{{AWSServiceName}}",
"type": "string"
},
{
"key": "region",
"value": "{{AWSRegion}}",
"type": "string"
},
{
"key": "secretKey",
"value": "{{AWSSecretKey}}",
"type": "string"
},
{
"key": "accessKey",
"value": "{{AWSAccessKey}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"key": "bucketName",
"value": "whatever-postman",
"type": "string"
}
]
}
answered 10 months ago
Relevant content
- asked 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago