Repository: cloud-custodian/cloud-custodian

Issue:
s3 tag action - support multiple tags being set
currently when setting multiple s3 tags, we end up overwriting them since we construct the tag document with all tags from the cached resource state, plus the action's tag values, so having multiple tag actions within a policy doesn't lead to the expected result (last tag action wins vs combined).  we should support multiple tag setting within the tag action, dictionary of k: v tags.


Discussion:
i think s3 tags are enough of special case (document oriented vs patch) that its worthwhile doing an api call to read tags fresh and merge with tags being set on tag modification.

Resolving patch:
diff --git a/c7n/resources/s3.py b/c7n/resources/s3.py
--- a/c7n/resources/s3.py
+++ b/c7n/resources/s3.py
@@ -479,7 +479,18 @@ def bucket_client(session, b, kms=False):
 def modify_bucket_tags(session_factory, buckets, add_tags=(), remove_tags=()):
     for bucket in buckets:
         client = bucket_client(local_session(session_factory), bucket)
-        # all the tag marshalling back and forth is a bit gross :-(
+        # Bucket tags are set atomically for the set/document, we want
+        # to refetch against current to guard against any staleness in
+        # our cached representation across multiple policies or concurrent
+        # modifications.
+        try:
+            bucket['Tags'] = client.get_bucket_tagging(
+                Bucket=bucket['Name']).get('TagSet', [])
+        except ClientError as e:
+            if e.response['Error']['Code'] != 'NoSuchTagSet':
+                raise
+            bucket['Tags'] = []
+
         new_tags = {t['Key']: t['Value'] for t in add_tags}
         for t in bucket.get('Tags', ()):
             if (t['Key'] not in new_tags and
@@ -487,6 +498,7 @@ def modify_bucket_tags(session_factory, buckets, add_tags=(), remove_tags=()):
                     t['Key'] not in remove_tags):
                 new_tags[t['Key']] = t['Value']
         tag_set = [{'Key': k, 'Value': v} for k, v in new_tags.items()]
+
         try:
             client.put_bucket_tagging(
                 Bucket=bucket['Name'], Tagging={'TagSet': tag_set})
diff --git a/c7n/tags.py b/c7n/tags.py
--- a/c7n/tags.py
+++ b/c7n/tags.py
@@ -416,7 +416,6 @@ def process(self, resources):
 
         tags = self.data.get('tags', [DEFAULT_TAG])
         batch_size = self.data.get('batch_size', self.batch_size)
-
         _common_tag_processer(
             self.executor_factory, batch_size, self.concurrency,
             self.process_resource_set, self.id_key, resources, tags, self.log)


Test patch:
diff --git a/tests/data/placebo/test_s3_mark_for_op/s3.GetBucketTagging_1.json b/tests/data/placebo/test_s3_mark_for_op/s3.GetBucketTagging_1.json
--- a/tests/data/placebo/test_s3_mark_for_op/s3.GetBucketTagging_1.json
+++ b/tests/data/placebo/test_s3_mark_for_op/s3.GetBucketTagging_1.json
@@ -1,24 +1,24 @@
 {
     "status_code": 200,
     "data": {
-        "TagSet": [
-            {
-                "Value": "mark-test",
-                "Key": "testtag"
-            }
-        ],
         "ResponseMetadata": {
+            "RequestId": "03686EA467C96F8D",
+            "HostId": "F1RTjwuMIxFi2Om8yw4bmMxYO+YHfUM1wD004XcNAD9Q6AK0hG5mfZceapInwTakUyH6Q4zsu9M=",
             "HTTPStatusCode": 200,
-            "RetryAttempts": 0,
-            "HostId": "4Dsofozdp6aPgxFzGV9chdXmXgfSB6Ifbs3vZP2KyZsaFJgXLnqKHG/vrnBWR+XAJc9KoRhUkX8=",
-            "RequestId": "9539606CDBE88F96",
             "HTTPHeaders": {
-                "x-amz-id-2": "4Dsofozdp6aPgxFzGV9chdXmXgfSB6Ifbs3vZP2KyZsaFJgXLnqKHG/vrnBWR+XAJc9KoRhUkX8=",
-                "date": "Thu, 08 Sep 2016 22:38:54 GMT",
+                "x-amz-id-2": "F1RTjwuMIxFi2Om8yw4bmMxYO+YHfUM1wD004XcNAD9Q6AK0hG5mfZceapInwTakUyH6Q4zsu9M=",
+                "x-amz-request-id": "03686EA467C96F8D",
+                "date": "Wed, 28 Mar 2018 10:46:23 GMT",
                 "transfer-encoding": "chunked",
-                "x-amz-request-id": "9539606CDBE88F96",
                 "server": "AmazonS3"
+            },
+            "RetryAttempts": 0
+        },
+        "TagSet": [
+            {
+                "Key": "env",
+                "Value": "dev"
             }
-        }
+        ]
     }
-}
+}
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_mark_for_op/s3.GetBucketTagging_2.json b/tests/data/placebo/test_s3_mark_for_op/s3.GetBucketTagging_2.json
--- a/tests/data/placebo/test_s3_mark_for_op/s3.GetBucketTagging_2.json
+++ b/tests/data/placebo/test_s3_mark_for_op/s3.GetBucketTagging_2.json
@@ -1,28 +1,24 @@
 {
-    "status_code": 200, 
+    "status_code": 200,
     "data": {
-        "TagSet": [
-            {
-                "Value": "Resource does not meet policy: delete@YYYY/MM/DD", 
-                "Key": "maid_status"
-            }, 
-            {
-                "Value": "mark-test", 
-                "Key": "testtag"
-            }
-        ], 
         "ResponseMetadata": {
-            "HTTPStatusCode": 200, 
-            "RetryAttempts": 0, 
-            "HostId": "4Dsofozdp6aPgxFzGV9chdXmXgfSB6Ifbs3vZP2KyZsaFJgXLnqKHG/vrnBWR+XAJc9KoRhUkX8=", 
-            "RequestId": "9539606CDBE88F96", 
+            "RequestId": "BC50B8A1DB197319",
+            "HostId": "fzJx90ReMK0K14I0pfBt7oMJTKJI/DMihNw/sDtp4VxjxyCKDD33Ynqp/zjdL6qFvyEBd7RESvQ=",
+            "HTTPStatusCode": 200,
             "HTTPHeaders": {
-                "x-amz-id-2": "4Dsofozdp6aPgxFzGV9chdXmXgfSB6Ifbs3vZP2KyZsaFJgXLnqKHG/vrnBWR+XAJc9KoRhUkX8=", 
-                "date": "Thu, 08 Sep 2016 22:38:54 GMT", 
-                "transfer-encoding": "chunked", 
-                "x-amz-request-id": "9539606CDBE88F96", 
+                "x-amz-id-2": "fzJx90ReMK0K14I0pfBt7oMJTKJI/DMihNw/sDtp4VxjxyCKDD33Ynqp/zjdL6qFvyEBd7RESvQ=",
+                "x-amz-request-id": "BC50B8A1DB197319",
+                "date": "Wed, 28 Mar 2018 10:46:24 GMT",
+                "transfer-encoding": "chunked",
                 "server": "AmazonS3"
+            },
+            "RetryAttempts": 0
+        },
+        "TagSet": [
+            {
+                "Key": "env",
+                "Value": "dev"
             }
-        }
+        ]
     }
 }
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_mark_for_op/s3.GetBucketTagging_3.json b/tests/data/placebo/test_s3_mark_for_op/s3.GetBucketTagging_3.json
new file mode 100644
--- /dev/null
+++ b/tests/data/placebo/test_s3_mark_for_op/s3.GetBucketTagging_3.json
@@ -0,0 +1,28 @@
+{
+    "status_code": 200,
+    "data": {
+        "ResponseMetadata": {
+            "RequestId": "D96D809048318E89",
+            "HostId": "tk6EXmmr+xqJ6mfgEOZrJCIKSky7leTJ0LDUVSpSti00DsPacxTmJXFRB5c1zxgtQcpF+q0T6w8=",
+            "HTTPStatusCode": 200,
+            "HTTPHeaders": {
+                "x-amz-id-2": "tk6EXmmr+xqJ6mfgEOZrJCIKSky7leTJ0LDUVSpSti00DsPacxTmJXFRB5c1zxgtQcpF+q0T6w8=",
+                "x-amz-request-id": "D96D809048318E89",
+                "date": "Wed, 28 Mar 2018 10:46:25 GMT",
+                "transfer-encoding": "chunked",
+                "server": "AmazonS3"
+            },
+            "RetryAttempts": 0
+        },
+        "TagSet": [
+            {
+                "Key": "env",
+                "Value": "dev"
+            },
+            {
+                "Key": "maid_status",
+                "Value": "Resource does not meet policy: delete@2018/03/31"
+            }
+        ]
+    }
+}
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_mark_for_op/s3.ListBuckets_1.json b/tests/data/placebo/test_s3_mark_for_op/s3.ListBuckets_1.json
--- a/tests/data/placebo/test_s3_mark_for_op/s3.ListBuckets_1.json
+++ b/tests/data/placebo/test_s3_mark_for_op/s3.ListBuckets_1.json
@@ -1,38 +1,38 @@
 {
     "status_code": 200,
     "data": {
-        "Owner": {
-            "DisplayName": "k_vertigo",
-            "ID": "e7c8bb65a5fc49cf906715eae09de9e4bb7861a96361ba79b833aa45f6833b15"
+        "ResponseMetadata": {
+            "RequestId": "C3A5A5A24FEE2CCE",
+            "HostId": "R09knsyAde8Au57Ie9R4r9e3uvWvKxA2ljPNcIhUR23DtdkqEEQtK873xwOmlBLV1hXFXKVhq7g=",
+            "HTTPStatusCode": 200,
+            "HTTPHeaders": {
+                "x-amz-id-2": "R09knsyAde8Au57Ie9R4r9e3uvWvKxA2ljPNcIhUR23DtdkqEEQtK873xwOmlBLV1hXFXKVhq7g=",
+                "x-amz-request-id": "C3A5A5A24FEE2CCE",
+                "date": "Wed, 28 Mar 2018 10:46:23 GMT",
+                "content-type": "application/xml",
+                "transfer-encoding": "chunked",
+                "server": "AmazonS3"
+            },
+            "RetryAttempts": 0
         },
         "Buckets": [
             {
+                "Name": "custodian-mark-test",
                 "CreationDate": {
-                    "hour": 20,
                     "__class__": "datetime",
-                    "month": 9,
-                    "second": 36,
-                    "microsecond": 0,
-                    "year": 2016,
-                    "day": 8,
-                    "minute": 8
-                },
-                "Name": "custodian-mark-test"
+                    "year": 2018,
+                    "month": 3,
+                    "day": 28,
+                    "hour": 10,
+                    "minute": 41,
+                    "second": 27,
+                    "microsecond": 0
+                }
             }
         ],
-        "ResponseMetadata": {
-            "HTTPStatusCode": 200,
-            "RetryAttempts": 0,
-            "HostId": "jlxyZKLNeeEouxSnN8T9Xn8XcRKGFiNQsBQvQfEOg+Tq3oYUtlqgRQB77r9lB1XhF7faJ+Uug+A=",
-            "RequestId": "01578A5F7F57317D",
-            "HTTPHeaders": {
-                "x-amz-id-2": "jlxyZKLNeeEouxSnN8T9Xn8XcRKGFiNQsBQvQfEOg+Tq3oYUtlqgRQB77r9lB1XhF7faJ+Uug+A=",
-                "server": "AmazonS3",
-                "transfer-encoding": "chunked",
-                "x-amz-request-id": "01578A5F7F57317D",
-                "date": "Thu, 08 Sep 2016 22:38:53 GMT",
-                "content-type": "application/xml"
-            }
+        "Owner": {
+            "DisplayName": "mandeep.bal",
+            "ID": "e7c8bb65a5fc49cf906715eae09de9e4bb7861a96361ba79b833aa45f6833b15"
         }
     }
 }
diff --git a/tests/data/placebo/test_s3_mark_for_op/s3.PutBucketTagging_1.json b/tests/data/placebo/test_s3_mark_for_op/s3.PutBucketTagging_1.json
--- a/tests/data/placebo/test_s3_mark_for_op/s3.PutBucketTagging_1.json
+++ b/tests/data/placebo/test_s3_mark_for_op/s3.PutBucketTagging_1.json
@@ -1,17 +1,17 @@
 {
-    "status_code": 204, 
+    "status_code": 204,
     "data": {
         "ResponseMetadata": {
-            "HTTPStatusCode": 204, 
-            "RetryAttempts": 0, 
-            "HostId": "J4biJatsAZB2FUckBEkxIrPLxpDWLWaqW80x61hxDbXcUpHAvvg0pFxgAUzCqIuLzXI+N1RC82s=", 
-            "RequestId": "310BE7BA91A72B63", 
+            "RequestId": "4D369297DEF3FFBC",
+            "HostId": "bSv1KDBaFEiawkncDzz1Jo4Tbn1nt3u81B/FbPz1FSGkSQbBvn7gr4aahTrI7Fra1GMQsP6dH9Q=",
+            "HTTPStatusCode": 204,
             "HTTPHeaders": {
-                "x-amz-id-2": "J4biJatsAZB2FUckBEkxIrPLxpDWLWaqW80x61hxDbXcUpHAvvg0pFxgAUzCqIuLzXI+N1RC82s=", 
-                "date": "Thu, 08 Sep 2016 22:38:53 GMT", 
-                "x-amz-request-id": "310BE7BA91A72B63", 
+                "x-amz-id-2": "bSv1KDBaFEiawkncDzz1Jo4Tbn1nt3u81B/FbPz1FSGkSQbBvn7gr4aahTrI7Fra1GMQsP6dH9Q=",
+                "x-amz-request-id": "4D369297DEF3FFBC",
+                "date": "Wed, 28 Mar 2018 10:46:24 GMT",
                 "server": "AmazonS3"
-            }
+            },
+            "RetryAttempts": 0
         }
     }
 }
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_remove_tag/s3.GetBucketTagging_1.json b/tests/data/placebo/test_s3_remove_tag/s3.GetBucketTagging_1.json
--- a/tests/data/placebo/test_s3_remove_tag/s3.GetBucketTagging_1.json
+++ b/tests/data/placebo/test_s3_remove_tag/s3.GetBucketTagging_1.json
@@ -1,40 +1,28 @@
 {
     "status_code": 200,
     "data": {
-        "TagSet": [
-            {
-                "Value": "CMDBEnvironment",
-                "Key": "ENVTEST"
-            },
-            {
-                "Value": "ASV",
-                "Key": "ASVTEST"
-            },
-            {
-                "Value": "OwnerContact",
-                "Key": "AutomatedTester"
-            },
-            {
-                "Value": "mark-test",
-                "Key": "testtag"
-            },
-            {
-                "Value": "Resource does not meet policy: delete@YYYY/MM/DD",
-                "Key": "maid_status"
-            }
-        ],
         "ResponseMetadata": {
+            "RequestId": "47D32013FF16CE2C",
+            "HostId": "TUoORNPt4HgX+5AJ/Os8prL7LXW0GKeC0Qn962RiPl1psh5CL/dZ/TO2zNnR3TrHFFPoqT3SlQY=",
             "HTTPStatusCode": 200,
-            "RetryAttempts": 0,
-            "HostId": "djM9fww+ngKM1mj3hEgKVN0uceZIfkPfNf8W9j39POr38RQbpD6PlWt/4mD/cpDvRCLirDbVQz0=",
-            "RequestId": "086E85625A85B53D",
             "HTTPHeaders": {
-                "x-amz-id-2": "djM9fww+ngKM1mj3hEgKVN0uceZIfkPfNf8W9j39POr38RQbpD6PlWt/4mD/cpDvRCLirDbVQz0=",
-                "date": "Thu, 08 Sep 2016 22:38:55 GMT",
+                "x-amz-id-2": "TUoORNPt4HgX+5AJ/Os8prL7LXW0GKeC0Qn962RiPl1psh5CL/dZ/TO2zNnR3TrHFFPoqT3SlQY=",
+                "x-amz-request-id": "47D32013FF16CE2C",
+                "date": "Wed, 28 Mar 2018 10:45:19 GMT",
                 "transfer-encoding": "chunked",
-                "x-amz-request-id": "086E85625A85B53D",
                 "server": "AmazonS3"
+            },
+            "RetryAttempts": 0
+        },
+        "TagSet": [
+            {
+                "Key": "env",
+                "Value": "dev"
+            },
+            {
+                "Key": "maid_status",
+                "Value": "blarg"
             }
-        }
+        ]
     }
-}
+}
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_remove_tag/s3.GetBucketTagging_2.json b/tests/data/placebo/test_s3_remove_tag/s3.GetBucketTagging_2.json
--- a/tests/data/placebo/test_s3_remove_tag/s3.GetBucketTagging_2.json
+++ b/tests/data/placebo/test_s3_remove_tag/s3.GetBucketTagging_2.json
@@ -1,36 +1,28 @@
 {
-    "status_code": 200, 
+    "status_code": 200,
     "data": {
-        "TagSet": [
-            {
-                "Value": "CMDBEnvironment", 
-                "Key": "ENVTEST"
-            }, 
-            {
-                "Value": "ASV", 
-                "Key": "ASVTEST"
-            }, 
-            {
-                "Value": "OwnerContact", 
-                "Key": "AutomatedTester"
-            }, 
-            {
-                "Value": "mark-test", 
-                "Key": "testtag"
-            }
-        ], 
         "ResponseMetadata": {
-            "HTTPStatusCode": 200, 
-            "RetryAttempts": 0, 
-            "HostId": "QCm3Q5WAJ2SK2dI+LH6ZPXP78a5eRV1wFvYk/nkEzL8GGB/tbcfOGyUOe6CYGI+tV5Li1lcifoQ=", 
-            "RequestId": "02B2960D2D420739", 
+            "RequestId": "D4499169DB8282DE",
+            "HostId": "0wEBzzanaQKoHDdZg3+bvbt5y+BNoTBbR1GYs3jOjogN1UgBAaKPzJSEFGBZvkVfeam9E9zWmGU=",
+            "HTTPStatusCode": 200,
             "HTTPHeaders": {
-                "x-amz-id-2": "QCm3Q5WAJ2SK2dI+LH6ZPXP78a5eRV1wFvYk/nkEzL8GGB/tbcfOGyUOe6CYGI+tV5Li1lcifoQ=", 
-                "date": "Thu, 08 Sep 2016 22:38:53 GMT", 
-                "transfer-encoding": "chunked", 
-                "x-amz-request-id": "02B2960D2D420739", 
+                "x-amz-id-2": "0wEBzzanaQKoHDdZg3+bvbt5y+BNoTBbR1GYs3jOjogN1UgBAaKPzJSEFGBZvkVfeam9E9zWmGU=",
+                "x-amz-request-id": "D4499169DB8282DE",
+                "date": "Wed, 28 Mar 2018 10:45:20 GMT",
+                "transfer-encoding": "chunked",
                 "server": "AmazonS3"
+            },
+            "RetryAttempts": 0
+        },
+        "TagSet": [
+            {
+                "Key": "env",
+                "Value": "dev"
+            },
+            {
+                "Key": "maid_status",
+                "Value": "blarg"
             }
-        }
+        ]
     }
 }
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_remove_tag/s3.GetBucketTagging_3.json b/tests/data/placebo/test_s3_remove_tag/s3.GetBucketTagging_3.json
new file mode 100644
--- /dev/null
+++ b/tests/data/placebo/test_s3_remove_tag/s3.GetBucketTagging_3.json
@@ -0,0 +1,24 @@
+{
+    "status_code": 200,
+    "data": {
+        "ResponseMetadata": {
+            "RequestId": "F8DC1A0AC4610CC4",
+            "HostId": "cXNBmm1hvQFa4W/TXq3YLWnybl+stSFx00uH6v35KbT7z47p25WKQzoIaMW30LsIM3p0QV44mzA=",
+            "HTTPStatusCode": 200,
+            "HTTPHeaders": {
+                "x-amz-id-2": "cXNBmm1hvQFa4W/TXq3YLWnybl+stSFx00uH6v35KbT7z47p25WKQzoIaMW30LsIM3p0QV44mzA=",
+                "x-amz-request-id": "F8DC1A0AC4610CC4",
+                "date": "Wed, 28 Mar 2018 10:45:21 GMT",
+                "transfer-encoding": "chunked",
+                "server": "AmazonS3"
+            },
+            "RetryAttempts": 0
+        },
+        "TagSet": [
+            {
+                "Key": "env",
+                "Value": "dev"
+            }
+        ]
+    }
+}
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_remove_tag/s3.ListBuckets_1.json b/tests/data/placebo/test_s3_remove_tag/s3.ListBuckets_1.json
--- a/tests/data/placebo/test_s3_remove_tag/s3.ListBuckets_1.json
+++ b/tests/data/placebo/test_s3_remove_tag/s3.ListBuckets_1.json
@@ -1,38 +1,38 @@
 {
     "status_code": 200,
     "data": {
-        "Owner": {
-            "DisplayName": "k_vertigo",
-            "ID": "e7c8bb65a5fc49cf906715eae09de9e4bb7861a96361ba79b833aa45f6833b15"
+        "ResponseMetadata": {
+            "RequestId": "D53E9129775D7479",
+            "HostId": "AVgV8tlJT84hu9nelD4dcAKRlL33AWKM9lUZqakSbWNl6/ZSTUau79Tim4VzHju8RghUrBjOKQo=",
+            "HTTPStatusCode": 200,
+            "HTTPHeaders": {
+                "x-amz-id-2": "AVgV8tlJT84hu9nelD4dcAKRlL33AWKM9lUZqakSbWNl6/ZSTUau79Tim4VzHju8RghUrBjOKQo=",
+                "x-amz-request-id": "D53E9129775D7479",
+                "date": "Wed, 28 Mar 2018 10:45:19 GMT",
+                "content-type": "application/xml",
+                "transfer-encoding": "chunked",
+                "server": "AmazonS3"
+            },
+            "RetryAttempts": 0
         },
         "Buckets": [
             {
+                "Name": "custodian-mark-test",
                 "CreationDate": {
-                    "hour": 20,
                     "__class__": "datetime",
-                    "month": 9,
-                    "second": 36,
-                    "microsecond": 0,
-                    "year": 2016,
-                    "day": 8,
-                    "minute": 8
-                },
-                "Name": "custodian-mark-test"
+                    "year": 2018,
+                    "month": 3,
+                    "day": 28,
+                    "hour": 10,
+                    "minute": 41,
+                    "second": 27,
+                    "microsecond": 0
+                }
             }
         ],
-        "ResponseMetadata": {
-            "HTTPStatusCode": 200,
-            "RetryAttempts": 0,
-            "HostId": "jlxyZKLNeeEouxSnN8T9Xn8XcRKGFiNQsBQvQfEOg+Tq3oYUtlqgRQB77r9lB1XhF7faJ+Uug+A=",
-            "RequestId": "01578A5F7F57317D",
-            "HTTPHeaders": {
-                "x-amz-id-2": "jlxyZKLNeeEouxSnN8T9Xn8XcRKGFiNQsBQvQfEOg+Tq3oYUtlqgRQB77r9lB1XhF7faJ+Uug+A=",
-                "server": "AmazonS3",
-                "transfer-encoding": "chunked",
-                "x-amz-request-id": "01578A5F7F57317D",
-                "date": "Thu, 08 Sep 2016 22:38:53 GMT",
-                "content-type": "application/xml"
-            }
+        "Owner": {
+            "DisplayName": "mandeep.bal",
+            "ID": "e7c8bb65a5fc49cf906715eae09de9e4bb7861a96361ba79b833aa45f6833b15"
         }
     }
 }
diff --git a/tests/data/placebo/test_s3_remove_tag/s3.PutBucketTagging_1.json b/tests/data/placebo/test_s3_remove_tag/s3.PutBucketTagging_1.json
--- a/tests/data/placebo/test_s3_remove_tag/s3.PutBucketTagging_1.json
+++ b/tests/data/placebo/test_s3_remove_tag/s3.PutBucketTagging_1.json
@@ -1,17 +1,17 @@
 {
-    "status_code": 204, 
+    "status_code": 204,
     "data": {
         "ResponseMetadata": {
-            "HTTPStatusCode": 204, 
-            "RetryAttempts": 0, 
-            "HostId": "HYVoZB/4vDK5Q4F5PQfzKLsZnh4EnZybDVERmTqDEUkvgulm0hhsr/kbejBZwz2W5DfXgnLyA6Q=", 
-            "RequestId": "0781A1467BC6B5D2", 
+            "RequestId": "63981B08F245F65B",
+            "HostId": "Ul4rIG7TGHvODtOOYQBVyBaClFtE0BCnksSd9g/IVInNpU1sYJGgMOX0/C+HBNqApOo2foRwtLw=",
+            "HTTPStatusCode": 204,
             "HTTPHeaders": {
-                "x-amz-id-2": "HYVoZB/4vDK5Q4F5PQfzKLsZnh4EnZybDVERmTqDEUkvgulm0hhsr/kbejBZwz2W5DfXgnLyA6Q=", 
-                "date": "Thu, 08 Sep 2016 22:38:54 GMT", 
-                "x-amz-request-id": "0781A1467BC6B5D2", 
+                "x-amz-id-2": "Ul4rIG7TGHvODtOOYQBVyBaClFtE0BCnksSd9g/IVInNpU1sYJGgMOX0/C+HBNqApOo2foRwtLw=",
+                "x-amz-request-id": "63981B08F245F65B",
+                "date": "Wed, 28 Mar 2018 10:45:20 GMT",
                 "server": "AmazonS3"
-            }
+            },
+            "RetryAttempts": 0
         }
     }
 }
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_tag/s3.CreateBucket_1.json b/tests/data/placebo/test_s3_tag/s3.CreateBucket_1.json
--- a/tests/data/placebo/test_s3_tag/s3.CreateBucket_1.json
+++ b/tests/data/placebo/test_s3_tag/s3.CreateBucket_1.json
@@ -1,19 +1,20 @@
 {
-    "status_code": 200, 
+    "status_code": 200,
     "data": {
-        "Location": "/custodian-tagger", 
         "ResponseMetadata": {
-            "HTTPStatusCode": 200, 
-            "HostId": "1KUr59TDvICqopLtL+E06i2tTVSu8PiEePRfyDv4hBp/JhBRF+DF2IEYv7sbF3jI", 
-            "RequestId": "FB87D82D9C1E9B81", 
+            "RequestId": "5E4264B8D5BA48E2",
+            "HostId": "3sWnmw3oJochBRn3ZrmprDcte9oymC+vlW47ZZ7XXDqHtRbYQ+G4EYBnrciuPi3yEIYomyWXuJU=",
+            "HTTPStatusCode": 200,
             "HTTPHeaders": {
-                "content-length": "0", 
-                "x-amz-id-2": "1KUr59TDvICqopLtL+E06i2tTVSu8PiEePRfyDv4hBp/JhBRF+DF2IEYv7sbF3jI", 
-                "server": "AmazonS3", 
-                "x-amz-request-id": "FB87D82D9C1E9B81", 
-                "location": "/custodian-tagger", 
-                "date": "Sun, 24 Jul 2016 17:36:51 GMT"
-            }
-        }
+                "x-amz-id-2": "3sWnmw3oJochBRn3ZrmprDcte9oymC+vlW47ZZ7XXDqHtRbYQ+G4EYBnrciuPi3yEIYomyWXuJU=",
+                "x-amz-request-id": "5E4264B8D5BA48E2",
+                "date": "Wed, 28 Mar 2018 10:37:04 GMT",
+                "location": "http://custodian-tagger.s3.amazonaws.com/",
+                "content-length": "0",
+                "server": "AmazonS3"
+            },
+            "RetryAttempts": 0
+        },
+        "Location": "http://custodian-tagger.s3.amazonaws.com/"
     }
 }
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_tag/s3.DeleteBucket_1.json b/tests/data/placebo/test_s3_tag/s3.DeleteBucket_1.json
--- a/tests/data/placebo/test_s3_tag/s3.DeleteBucket_1.json
+++ b/tests/data/placebo/test_s3_tag/s3.DeleteBucket_1.json
@@ -1,16 +1,17 @@
 {
-    "status_code": 204, 
+    "status_code": 204,
     "data": {
         "ResponseMetadata": {
-            "HTTPStatusCode": 204, 
-            "HostId": "plBct9IrFEyjXl8qw6unCeJgkjzBsKaIb4xDcs+3RJ5ETvAyuZJ6tgBoN1N5UsTe", 
-            "RequestId": "E75C42CD96C1D102", 
+            "RequestId": "F81A5F20F46B630D",
+            "HostId": "QJGduYnxd8h/IGS6ty54vFMCJXs35aoOiuBWOUCOezKij6EZcWECNExkBlv+e96al2H6ygfH2AI=",
+            "HTTPStatusCode": 204,
             "HTTPHeaders": {
-                "x-amz-id-2": "plBct9IrFEyjXl8qw6unCeJgkjzBsKaIb4xDcs+3RJ5ETvAyuZJ6tgBoN1N5UsTe", 
-                "date": "Sun, 24 Jul 2016 17:36:57 GMT", 
-                "x-amz-request-id": "E75C42CD96C1D102", 
+                "x-amz-id-2": "QJGduYnxd8h/IGS6ty54vFMCJXs35aoOiuBWOUCOezKij6EZcWECNExkBlv+e96al2H6ygfH2AI=",
+                "x-amz-request-id": "F81A5F20F46B630D",
+                "date": "Wed, 28 Mar 2018 10:37:10 GMT",
                 "server": "AmazonS3"
-            }
+            },
+            "RetryAttempts": 0
         }
     }
 }
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_tag/s3.GetBucketTagging_1.json b/tests/data/placebo/test_s3_tag/s3.GetBucketTagging_1.json
--- a/tests/data/placebo/test_s3_tag/s3.GetBucketTagging_1.json
+++ b/tests/data/placebo/test_s3_tag/s3.GetBucketTagging_1.json
@@ -1,23 +1,28 @@
 {
-    "status_code": 404, 
+    "status_code": 200,
     "data": {
         "ResponseMetadata": {
-            "HTTPStatusCode": 404, 
-            "HostId": "4KxgSXamX14Es3xYYFPZnNMk0s4HWV36iBv50eUH3yUy5UQ5IZBRK27yGzwLI0HE", 
-            "RequestId": "48759176ED92BCCE", 
+            "RequestId": "B9BA583E1E9ED285",
+            "HostId": "q6CaLuKlBJTNdn03o7xHOHEmBuwW5q7FLWPL73ZCjYACZdxMq+NN9qq2nWBz9HheTAjXYymUk8M=",
+            "HTTPStatusCode": 200,
             "HTTPHeaders": {
-                "x-amz-id-2": "4KxgSXamX14Es3xYYFPZnNMk0s4HWV36iBv50eUH3yUy5UQ5IZBRK27yGzwLI0HE", 
-                "server": "AmazonS3", 
-                "transfer-encoding": "chunked", 
-                "x-amz-request-id": "48759176ED92BCCE", 
-                "date": "Sun, 24 Jul 2016 17:36:51 GMT", 
-                "content-type": "application/xml"
+                "x-amz-id-2": "q6CaLuKlBJTNdn03o7xHOHEmBuwW5q7FLWPL73ZCjYACZdxMq+NN9qq2nWBz9HheTAjXYymUk8M=",
+                "x-amz-request-id": "B9BA583E1E9ED285",
+                "date": "Wed, 28 Mar 2018 10:37:08 GMT",
+                "transfer-encoding": "chunked",
+                "server": "AmazonS3"
+            },
+            "RetryAttempts": 1
+        },
+        "TagSet": [
+            {
+                "Key": "rudolph",
+                "Value": "reindeer"
+            },
+            {
+                "Key": "platform",
+                "Value": "lxwee"
             }
-        }, 
-        "Error": {
-            "Message": "The TagSet does not exist", 
-            "Code": "NoSuchTagSet", 
-            "BucketName": "config-bucket-644160558196"
-        }
+        ]
     }
 }
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_tag/s3.GetBucketTagging_2.json b/tests/data/placebo/test_s3_tag/s3.GetBucketTagging_2.json
--- a/tests/data/placebo/test_s3_tag/s3.GetBucketTagging_2.json
+++ b/tests/data/placebo/test_s3_tag/s3.GetBucketTagging_2.json
@@ -1,23 +1,28 @@
 {
-    "status_code": 404, 
+    "status_code": 200,
     "data": {
         "ResponseMetadata": {
-            "HTTPStatusCode": 404, 
-            "HostId": "rdwH7Qb6bL5u7CbQPJGCIa7jXhZFS1FaYbxxVK+P41xKXU5ZcjyzEjp7eCZRaJRS", 
-            "RequestId": "53ECA535C5830C5E", 
+            "RequestId": "881FA07C340A8C27",
+            "HostId": "1qKW/J7Ee9oEs4+uP8ZoK/cE2TPoVmHx8JTzD0F2AFFsalIKuq9cC/azJrf+ZU7OM6KriUg040w=",
+            "HTTPStatusCode": 200,
             "HTTPHeaders": {
-                "x-amz-id-2": "rdwH7Qb6bL5u7CbQPJGCIa7jXhZFS1FaYbxxVK+P41xKXU5ZcjyzEjp7eCZRaJRS", 
-                "server": "AmazonS3", 
-                "transfer-encoding": "chunked", 
-                "x-amz-request-id": "53ECA535C5830C5E", 
-                "date": "Sun, 24 Jul 2016 17:36:52 GMT", 
-                "content-type": "application/xml"
+                "x-amz-id-2": "1qKW/J7Ee9oEs4+uP8ZoK/cE2TPoVmHx8JTzD0F2AFFsalIKuq9cC/azJrf+ZU7OM6KriUg040w=",
+                "x-amz-request-id": "881FA07C340A8C27",
+                "date": "Wed, 28 Mar 2018 10:37:09 GMT",
+                "transfer-encoding": "chunked",
+                "server": "AmazonS3"
+            },
+            "RetryAttempts": 1
+        },
+        "TagSet": [
+            {
+                "Key": "rudolph",
+                "Value": "reindeer"
+            },
+            {
+                "Key": "platform",
+                "Value": "lxwee"
             }
-        }, 
-        "Error": {
-            "Message": "The TagSet does not exist", 
-            "Code": "NoSuchTagSet", 
-            "BucketName": "custodian-skunk-trails"
-        }
+        ]
     }
 }
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_tag/s3.GetBucketTagging_3.json b/tests/data/placebo/test_s3_tag/s3.GetBucketTagging_3.json
--- a/tests/data/placebo/test_s3_tag/s3.GetBucketTagging_3.json
+++ b/tests/data/placebo/test_s3_tag/s3.GetBucketTagging_3.json
@@ -1,27 +1,32 @@
 {
-    "status_code": 200, 
+    "status_code": 200,
     "data": {
-        "TagSet": [
-            {
-                "Value": "reindeer", 
-                "Key": "rudolph"
-            }, 
-            {
-                "Value": "lxwee", 
-                "Key": "platform"
-            }
-        ], 
         "ResponseMetadata": {
-            "HTTPStatusCode": 200, 
-            "HostId": "kvZKIA/TMwIxJrJVS7wrBCQB7OkD+L16hdzIO65cPDkbcK5iWOMl3TaoV8iLvUv+", 
-            "RequestId": "23C981C633365E05", 
+            "RequestId": "221A5C468790AE3D",
+            "HostId": "6DCXdH/3NhAyTq5DUbtz/f3B6QEYEqxe0OvBqC4dEDTsVo8U6xkixMNOcf0THx0lZ2vQYtHQyqU=",
+            "HTTPStatusCode": 200,
             "HTTPHeaders": {
-                "x-amz-id-2": "kvZKIA/TMwIxJrJVS7wrBCQB7OkD+L16hdzIO65cPDkbcK5iWOMl3TaoV8iLvUv+", 
-                "date": "Sun, 24 Jul 2016 17:36:55 GMT", 
-                "transfer-encoding": "chunked", 
-                "x-amz-request-id": "23C981C633365E05", 
+                "x-amz-id-2": "6DCXdH/3NhAyTq5DUbtz/f3B6QEYEqxe0OvBqC4dEDTsVo8U6xkixMNOcf0THx0lZ2vQYtHQyqU=",
+                "x-amz-request-id": "221A5C468790AE3D",
+                "date": "Wed, 28 Mar 2018 10:37:10 GMT",
+                "transfer-encoding": "chunked",
                 "server": "AmazonS3"
+            },
+            "RetryAttempts": 0
+        },
+        "TagSet": [
+            {
+                "Key": "rudolph",
+                "Value": "reindeer"
+            },
+            {
+                "Key": "borrowed",
+                "Value": "new"
+            },
+            {
+                "Key": "platform",
+                "Value": "serverless"
             }
-        }
+        ]
     }
 }
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_tag/s3.GetBucketTagging_4.json b/tests/data/placebo/test_s3_tag/s3.GetBucketTagging_4.json
deleted file mode 100644
--- a/tests/data/placebo/test_s3_tag/s3.GetBucketTagging_4.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
-    "status_code": 200, 
-    "data": {
-        "TagSet": [
-            {
-                "Value": "reindeer", 
-                "Key": "rudolph"
-            }, 
-            {
-                "Value": "new", 
-                "Key": "borrowed"
-            }, 
-            {
-                "Value": "serverless", 
-                "Key": "platform"
-            }
-        ], 
-        "ResponseMetadata": {
-            "HTTPStatusCode": 200, 
-            "HostId": "HVy0wSnoGk7IDgzrreHXK20x13/NV70O90YXjQUbynyUqCdRwY/XAm3ri8UoRje5", 
-            "RequestId": "A136266FA738F60C", 
-            "HTTPHeaders": {
-                "x-amz-id-2": "HVy0wSnoGk7IDgzrreHXK20x13/NV70O90YXjQUbynyUqCdRwY/XAm3ri8UoRje5", 
-                "date": "Sun, 24 Jul 2016 17:36:56 GMT", 
-                "transfer-encoding": "chunked", 
-                "x-amz-request-id": "A136266FA738F60C", 
-                "server": "AmazonS3"
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_tag/s3.ListBuckets_1.json b/tests/data/placebo/test_s3_tag/s3.ListBuckets_1.json
--- a/tests/data/placebo/test_s3_tag/s3.ListBuckets_1.json
+++ b/tests/data/placebo/test_s3_tag/s3.ListBuckets_1.json
@@ -1,63 +1,38 @@
 {
-    "status_code": 200, 
+    "status_code": 200,
     "data": {
-        "Owner": {
-            "DisplayName": "mandeep.bal", 
-            "ID": "e7c8bb65a5fc49cf906715eae09de9e4bb7861a96361ba79b833aa45f6833b15"
-        }, 
+        "ResponseMetadata": {
+            "RequestId": "6D98497201F4BF9F",
+            "HostId": "5b3kqR1n4lilEbFFYQpSdm/DMBH6QNc+/P62ZcnO6oTo+PaL8XR+3QtjhokUA2XDf6VoopKIl60=",
+            "HTTPStatusCode": 200,
+            "HTTPHeaders": {
+                "x-amz-id-2": "5b3kqR1n4lilEbFFYQpSdm/DMBH6QNc+/P62ZcnO6oTo+PaL8XR+3QtjhokUA2XDf6VoopKIl60=",
+                "x-amz-request-id": "6D98497201F4BF9F",
+                "date": "Wed, 28 Mar 2018 10:37:06 GMT",
+                "content-type": "application/xml",
+                "transfer-encoding": "chunked",
+                "server": "AmazonS3"
+            },
+            "RetryAttempts": 0
+        },
         "Buckets": [
             {
+                "Name": "custodian-tagger",
                 "CreationDate": {
-                    "hour": 10, 
-                    "__class__": "datetime", 
-                    "month": 7, 
-                    "second": 14, 
-                    "microsecond": 0, 
-                    "year": 2016, 
-                    "day": 24, 
-                    "minute": 38
-                }, 
-                "Name": "config-bucket-644160558196"
-            }, 
-            {
-                "CreationDate": {
-                    "hour": 8, 
-                    "__class__": "datetime", 
-                    "month": 7, 
-                    "second": 21, 
-                    "microsecond": 0, 
-                    "year": 2016, 
-                    "day": 24, 
-                    "minute": 50
-                }, 
-                "Name": "custodian-skunk-trails"
-            }, 
-            {
-                "CreationDate": {
-                    "hour": 17, 
-                    "__class__": "datetime", 
-                    "month": 7, 
-                    "second": 51, 
-                    "microsecond": 0, 
-                    "year": 2016, 
-                    "day": 24, 
-                    "minute": 36
-                }, 
-                "Name": "custodian-tagger"
-            }
-        ], 
-        "ResponseMetadata": {
-            "HTTPStatusCode": 200, 
-            "HostId": "W59yDmr/YiMM/XwwSVX4w4U8XgALu6D+B4JAPWC1ii3fT+eo10u/tINXEeQWkaId1RdxA2XVeiw=", 
-            "RequestId": "F98F9BDA8AE99868", 
-            "HTTPHeaders": {
-                "x-amz-id-2": "W59yDmr/YiMM/XwwSVX4w4U8XgALu6D+B4JAPWC1ii3fT+eo10u/tINXEeQWkaId1RdxA2XVeiw=", 
-                "server": "AmazonS3", 
-                "transfer-encoding": "chunked", 
-                "x-amz-request-id": "F98F9BDA8AE99868", 
-                "date": "Sun, 24 Jul 2016 17:36:52 GMT", 
-                "content-type": "application/xml"
+                    "__class__": "datetime",
+                    "year": 2018,
+                    "month": 3,
+                    "day": 28,
+                    "hour": 10,
+                    "minute": 37,
+                    "second": 4,
+                    "microsecond": 0
+                }
             }
+        ],
+        "Owner": {
+            "DisplayName": "mandeep.bal",
+            "ID": "e7c8bb65a5fc49cf906715eae09de9e4bb7861a96361ba79b833aa45f6833b15"
         }
     }
-}
\ No newline at end of file
+}
diff --git a/tests/data/placebo/test_s3_tag/s3.ListObjectVersions_1.json b/tests/data/placebo/test_s3_tag/s3.ListObjectVersions_1.json
new file mode 100644
--- /dev/null
+++ b/tests/data/placebo/test_s3_tag/s3.ListObjectVersions_1.json
@@ -0,0 +1,24 @@
+{
+    "status_code": 404,
+    "data": {
+        "Error": {
+            "Code": "NoSuchBucket",
+            "Message": "The specified bucket does not exist",
+            "BucketName": "custodian-tagger"
+        },
+        "ResponseMetadata": {
+            "RequestId": "E2817BF7AB9363B0",
+            "HostId": "3sUX/0P3J2swc1IiqlID9myO2x8TKD9gLs60iaERnBsAN54e1NV9HAJfvi5HdSHDbpXw1yOnOSY=",
+            "HTTPStatusCode": 404,
+            "HTTPHeaders": {
+                "x-amz-request-id": "E2817BF7AB9363B0",
+                "x-amz-id-2": "3sUX/0P3J2swc1IiqlID9myO2x8TKD9gLs60iaERnBsAN54e1NV9HAJfvi5HdSHDbpXw1yOnOSY=",
+                "content-type": "application/xml",
+                "transfer-encoding": "chunked",
+                "date": "Wed, 28 Mar 2018 10:37:02 GMT",
+                "server": "AmazonS3"
+            },
+            "RetryAttempts": 0
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_tag/s3.ListObjects_1.json b/tests/data/placebo/test_s3_tag/s3.ListObjects_1.json
--- a/tests/data/placebo/test_s3_tag/s3.ListObjects_1.json
+++ b/tests/data/placebo/test_s3_tag/s3.ListObjects_1.json
@@ -1,25 +1,26 @@
 {
-    "status_code": 200, 
+    "status_code": 200,
     "data": {
-        "MaxKeys": 1000, 
-        "Prefix": "", 
-        "Name": "custodian-tagger", 
         "ResponseMetadata": {
-            "HTTPStatusCode": 200, 
-            "HostId": "tREfReiNXJRMH6GOD5FrApdu802yEFwu4NLCl8WViaKxL2rpQZUflo1Jv9GJTPsf", 
-            "RequestId": "4418C7A2DB1A52C3", 
+            "RequestId": "9D4C9BBF709F2320",
+            "HostId": "ubISBAQnM/NTIaMvwl99C2h8RCXn+Dpm1BhZKJ2M4hFf5bk1RLx+PplSqoRnXoE2hYkEssNLZNY=",
+            "HTTPStatusCode": 200,
             "HTTPHeaders": {
-                "x-amz-bucket-region": "us-east-1", 
-                "x-amz-id-2": "tREfReiNXJRMH6GOD5FrApdu802yEFwu4NLCl8WViaKxL2rpQZUflo1Jv9GJTPsf", 
-                "server": "AmazonS3", 
-                "transfer-encoding": "chunked", 
-                "x-amz-request-id": "4418C7A2DB1A52C3", 
-                "date": "Sun, 24 Jul 2016 17:36:56 GMT", 
-                "content-type": "application/xml"
-            }
-        }, 
-        "Marker": "", 
-        "EncodingType": "url", 
-        "IsTruncated": false
+                "x-amz-id-2": "ubISBAQnM/NTIaMvwl99C2h8RCXn+Dpm1BhZKJ2M4hFf5bk1RLx+PplSqoRnXoE2hYkEssNLZNY=",
+                "x-amz-request-id": "9D4C9BBF709F2320",
+                "date": "Wed, 28 Mar 2018 10:37:10 GMT",
+                "x-amz-bucket-region": "us-east-2",
+                "content-type": "application/xml",
+                "transfer-encoding": "chunked",
+                "server": "AmazonS3"
+            },
+            "RetryAttempts": 0
+        },
+        "IsTruncated": false,
+        "Marker": "",
+        "Name": "custodian-tagger",
+        "Prefix": "",
+        "MaxKeys": 1000,
+        "EncodingType": "url"
     }
 }
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_tag/s3.PutBucketTagging_1.json b/tests/data/placebo/test_s3_tag/s3.PutBucketTagging_1.json
--- a/tests/data/placebo/test_s3_tag/s3.PutBucketTagging_1.json
+++ b/tests/data/placebo/test_s3_tag/s3.PutBucketTagging_1.json
@@ -1,16 +1,17 @@
 {
-    "status_code": 204, 
+    "status_code": 204,
     "data": {
         "ResponseMetadata": {
-            "HTTPStatusCode": 204, 
-            "HostId": "w6jkE18LDnxISpAb+N+c6cG9Yjam4eEsJZG+EG8yOv6aMAlLrHF8J1ocVcQfVAA3", 
-            "RequestId": "4068AFC44F59982B", 
+            "RequestId": "529BEAAB595EEA28",
+            "HostId": "QxuZFYSXJTIWQuLY6B5/upOOhCAwQjU7J37DksXq3PwJOKI9zNpilsc3z5xuakvyLAJfqtB2YnY=",
+            "HTTPStatusCode": 204,
             "HTTPHeaders": {
-                "x-amz-id-2": "w6jkE18LDnxISpAb+N+c6cG9Yjam4eEsJZG+EG8yOv6aMAlLrHF8J1ocVcQfVAA3", 
-                "date": "Sun, 24 Jul 2016 17:36:51 GMT", 
-                "x-amz-request-id": "4068AFC44F59982B", 
+                "x-amz-id-2": "QxuZFYSXJTIWQuLY6B5/upOOhCAwQjU7J37DksXq3PwJOKI9zNpilsc3z5xuakvyLAJfqtB2YnY=",
+                "x-amz-request-id": "529BEAAB595EEA28",
+                "date": "Wed, 28 Mar 2018 10:37:05 GMT",
                 "server": "AmazonS3"
-            }
+            },
+            "RetryAttempts": 1
         }
     }
 }
\ No newline at end of file
diff --git a/tests/data/placebo/test_s3_tag/s3.PutBucketTagging_2.json b/tests/data/placebo/test_s3_tag/s3.PutBucketTagging_2.json
--- a/tests/data/placebo/test_s3_tag/s3.PutBucketTagging_2.json
+++ b/tests/data/placebo/test_s3_tag/s3.PutBucketTagging_2.json
@@ -1,16 +1,17 @@
 {
-    "status_code": 204, 
+    "status_code": 204,
     "data": {
         "ResponseMetadata": {
-            "HTTPStatusCode": 204, 
-            "HostId": "3pR+YhaFdpz+LYVgWIqJPYf3n1G63MqcPzohZQd14JZt42ThiNFe1yN1XFZpVWGg", 
-            "RequestId": "644BADEC3825D3F5", 
+            "RequestId": "1A33D6016360C7CB",
+            "HostId": "Zmoa3cv3qG1b/WruFUWaWJCkRTkPgdw6izBr6bbofa8OE2GiJZljQNehm4tY+C2Bw5OBpRXF1/c=",
+            "HTTPStatusCode": 204,
             "HTTPHeaders": {
-                "x-amz-id-2": "3pR+YhaFdpz+LYVgWIqJPYf3n1G63MqcPzohZQd14JZt42ThiNFe1yN1XFZpVWGg", 
-                "date": "Sun, 24 Jul 2016 17:36:56 GMT", 
-                "x-amz-request-id": "644BADEC3825D3F5", 
+                "x-amz-id-2": "Zmoa3cv3qG1b/WruFUWaWJCkRTkPgdw6izBr6bbofa8OE2GiJZljQNehm4tY+C2Bw5OBpRXF1/c=",
+                "x-amz-request-id": "1A33D6016360C7CB",
+                "date": "Wed, 28 Mar 2018 10:37:09 GMT",
                 "server": "AmazonS3"
-            }
+            },
+            "RetryAttempts": 0
         }
     }
 }
\ No newline at end of file
diff --git a/tests/test_s3.py b/tests/test_s3.py
--- a/tests/test_s3.py
+++ b/tests/test_s3.py
@@ -560,7 +560,8 @@ def test_tag_bucket(self):
         bname = 'custodian-tagger'
         if self.recording:
             destroyBucketIfPresent(client, bname)
-        client.create_bucket(Bucket=bname,
+        client.create_bucket(
+            Bucket=bname,
             CreateBucketConfiguration={'LocationConstraint': 'us-east-2'})
         self.addCleanup(destroyBucket, client, bname)
         client.put_bucket_tagging(
@@ -2234,6 +2235,8 @@ def test_s3_mark_for_op(self):
     def test_s3_remove_tag(self):
         self.patch(s3, 'S3_AUGMENT_TABLE', [
             ('get_bucket_tagging', 'Tags', [], 'TagSet')])
+        self.patch(
+            s3.RemoveTag, 'executor_factory', MainThreadExecutor)
         session_factory = self.replay_flight_data('test_s3_remove_tag')
         session = session_factory()
         client = session.client('s3')
@@ -2249,6 +2252,8 @@ def test_s3_remove_tag(self):
         tags = client.get_bucket_tagging(Bucket=bname)
         tag_map = {t['Key']: t['Value'] for t in tags.get('TagSet', {})}
         self.assertTrue('maid_status' not in tag_map)
+        old_tags = {t['Key']: t['Value'] for t in resources[0]['Tags']}
+        self.assertTrue('maid_status' in old_tags)
 
     def test_hosts_website(self):
         self.patch(s3, 'S3_AUGMENT_TABLE', [