You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -211,32 +205,30 @@ func (s *Service) Delete(ctx context.Context, m *scope.MachineScope) error {
211
205
Key: aws.String(key),
212
206
})
213
207
iferr!=nil {
214
-
varaerr smithy.APIError
215
-
iferrors.As(err, &aerr) {
216
-
switchaerr.ErrorCode() {
217
-
case"Forbidden":
218
-
// In the case that the IAM policy does not have sufficient
219
-
// permissions to get the object, we will attempt to delete it
220
-
// anyway for backwards compatibility reasons.
221
-
s.scope.Debug("Received 403 forbidden from S3 HeadObject call. If GetObject permission has been granted to the controller but not ListBucket, object is already deleted. Attempting deletion anyway in case GetObject permission hasn't been granted to the controller but DeleteObject has.", "bucket", bucket, "key", key)
// In the case that the IAM policy does not have sufficient
212
+
// permissions to get the object, we will attempt to delete it
213
+
// anyway for backwards compatibility reasons.
214
+
s.scope.Debug("Received 403 forbidden from S3 HeadObject call. If GetObject permission has been granted to the controller but not ListBucket, object is already deleted. Attempting deletion anyway in case GetObject permission hasn't been granted to the controller but DeleteObject has.", "bucket", bucket, "key", key)
0 commit comments