I have this function working as expected in python.
How do I convert it to AWS Lambda function?

```
def mymailgun(url):    
    import urllib2
    myfile=urllib2.urlopen(url)

    import requests
    print requests.post("https://api.mailgun.net/v3/XXX.mailgun.org/messages",
                        auth=("api", "key-XXX"),
                        files=[("attachment", myfile)
                               #("attachment", open("files/test.txt"))
                               ],
                        data={"from": "Excited User <excited-user@example.com>",
                              "to": "XXX@gmail.com",
                              "cc": "YYY@yahoo.com",
                              "bcc": "ZZZ@hotmail.com",
                              "subject": "Hello",
                              "text": "Testing some awesomness with attachments!",
                              "html": myfile})

```