Yes, by creating a distribution rule and defining an action to save the message to S3, you can receive the email message and its attachment as an S3 object from the bucket specified in the rule.
For example, you specify the rule for the recipient s3@sms.example.com and assign the S3 action to write to S3 bucket call sms-example.com under the prefix, messages will be delivered to this bucket for this recipient.
As described in http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-consider-use-case.html :
Amazon SES provides you with a raw, unmodified email address , which is usually in Multipurpose Internet Mail Extensions (MIME) format. For more information on the MIME format, see RFC 2045.
This means that the attachments will be encoded in MIME format, as a Multipage message
Since the email comes as raw MIME email, you need to parse the file and extract the attachments. Here is an example of what an email with attachments would look like:
MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=frontier This is a message with multiple parts in MIME format.
You can see the application where Content-Type: application/octet-stream starts. The attachment is encoded in base64.
See RFC 2045 Multipurpose Internet Email Extensions
Here is the complete message sent to S3, including a JPG attachment named "example.jpg". It was delivered to the following S3 location: https://s3.amazonaws.com/sms-example.com/messages/jldcn43gv5tt9qvhuia34ihodm6erpmqe3l7ghg1 . The name of the object is taken from the SMTP identifier provided by the message.
Return-Path: < user@example.com > Received: from mx6.example.com (mx6.example.com [255.255.245.6]) by inbound-smtp.us-east-1.amazonaws.com with SMTP id jldcn43gv5tt9qvhuia34ihodm6erpmqe3l7ghg1 for s3@sms.example.com ; Thu, 27 Jul 2017 16:53:34 +0000 (UTC) X-SES-Spam-Verdict: PASS X-SES-Virus-Verdict: PASS Received-SPF: softfail (spfCheck: transitioning domain of example.com does not designate 255.255.245.6 as permitted sender) client-ip=255.255.245.6; envelope-from=user@example.com ; helo=mx6.example.com; Authentication-Results: amazonses.com; spf=softfail (spfCheck: transitioning domain of example.com does not designate 255.255.245.6 as permitted sender) client-ip=255.255.245.6; envelope-from=user@example.com ; helo=mx6.example.com; X-SES-RECEIPT: AEFBQUFBQUFBQUFHbmZUa1QwOTA4N1dQc2ZiRGFQMTFMdzBNdzNkWG1uMEFEaGpIeEo4eHRuWUIrZUp3ZzJwK1RhZE1sWDhGY0RGWUg3Q2Q2U25Eb3BjNVVtTnhNQjVaWWhUN3c1NU4yWDRHMUxrNFlaRTRzcFU4aE5MbDZWUnBuVEdXN1VsNExBa2hrUHBMQnlPN1hDdzZnZXB1ek53MkwvZkVUcHpiZ3hJK2hESmNNUm5sNGxPazNMYnQrSG11UjY0djFxZ2VBalF6QlhZRnlWdWdQamcwTzlNN2xHZEticG5oZUQ1ZFVoTC9WWUtiZjY5amhkMTlRd1BWbUkyMnpIbmJUb0xpMzhVTlBMSzBqZzI3MFZHVFQvcU5CaHA0Rw== X-SES-DKIM-SIGNATURE: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1501174414; h=X-SES-RECEIPT:Date:Subject:Message-ID:From:To:MIME-Version:Content-Type; bh=Kf3QaHVBBiEvy382/1pLBxRFSsmLtlEpffsi6Kju+B4=; b=h8+aAxvaaTyhF1HrkKjx7wWmdZ9IZ1wBAhULLQ6Yrf2ILYgiI5dWReJ5pZ5B3gkz IBTbMyLoX5/8mAxHck0OT8mHs7phuIh0kad3Aioel92PYKeVkr+k33/dQmD3B5r5UKn VEM41uSKQu2rGwB5CuAIgoGmKYMyeXnmX+bi6JL0= X-Footer: a21zbXguY29t Received: from mx4.example.com ([192.99.225.232]) (authenticated user admin@kmsmx.com ) by mx6.example.com (Mailer 9.2.3) with ESMTPSA (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)) for s3@sms.example.com ; Thu, 27 Jul 2017 10:53:30 -0600 X-Footer: ZG9qaWdneS5jb20= Received: from localhost ([127.0.0.1]) by mx4.example.com (Mailer 9.2.3) with ESMTPSA for s3@sms.example.com ; Thu, 27 Jul 2017 10:53:04 -0600 Date: Thu, 27 Jul 2017 10:53:04 -0600 Subject: attachment X-Mailer: Mailer 9.2.3/Mailer Client X-User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 Message-ID: < 2230798078-6450@mx4.example.com > From: User < user@example.com > To: s3@sms.example.com X-Priority: 3 Importance: Normal MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-u4HpRD436UcA8Yj9oMVl" --=-u4HpRD436UcA8Yj9oMVl Content-Type: multipart/alternative; boundary="=-89WEH0obI4GHeo+VHXBi" --=-89WEH0obI4GHeo+VHXBi Content-Type: text/plain; charset="utf-8" --=-89WEH0obI4GHeo+VHXBi Content-Type: text/html; charset="utf-8" <html><head></head><body></body></html> --=-89WEH0obI4GHeo+VHXBi-- --=-u4HpRD436UcA8Yj9oMVl Content-Type: image/jpeg; name="example.jpg" Content-Disposition: attachment; filename="example.jpg" Content-Transfer-Encoding: base64 /9j/4AAQSkZJRgABAQEAYABgAAD/4RDaRXhpZgAATU0AKgAAAAgABAE7AAIAAAAFAAAISodpAAQA AAABAAAIUJydAAEAAAAKAAAQyOocAAcAAAgMAAAAPgAAAAAc6gAAAAgAAAAAAAAAAAAAAAAAAAAA --=-u4HpRD436UcA8Yj9oMVl--