Well, do a GET on the attachment URL in S3. Then store that somewhere. (You can't put it into CBL's attachment store, at least not without adding a duplicate copy of the attachment to the doc, which will then be synced back to the server, forming an infinite feedback loop…)
If you're trying to make it so attachments are stored only in S3, you'd have to ensure they never got into Sync Gateway or CBL at all. Have the client app upload the attachment to S3 and then put the resulting URL into the document instead of an attachment. Then any client that gets the document and wants the attachment can download it from S3.
—Jens