{"id":21379568,"url":"https://github.com/mfkimbell/cloud-file-sharing-service","last_synced_at":"2026-04-28T16:01:56.197Z","repository":{"id":183549077,"uuid":"670348562","full_name":"mfkimbell/cloud-file-sharing-service","owner":"mfkimbell","description":"AWS Application that utilizes lambda to allow for users to sign up for and use a cloud file sharing service through SNS. It also manages a MySQL database to track users. ","archived":false,"fork":false,"pushed_at":"2023-12-02T06:23:00.000Z","size":122,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T22:31:22.802Z","etag":null,"topics":["aws","aws-lambda","boto3","ec2","flask","iam","mysql","rds","s3","ses","sns"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mfkimbell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-24T21:13:59.000Z","updated_at":"2023-11-14T04:20:52.000Z","dependencies_parsed_at":"2023-07-27T03:14:47.175Z","dependency_job_id":"b60692f0-8440-46d2-804a-4a7e85568c22","html_url":"https://github.com/mfkimbell/cloud-file-sharing-service","commit_stats":null,"previous_names":["mfkimbell/cloud-file-upload","mfkimbell/cloud-file-sharing-service"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfkimbell%2Fcloud-file-sharing-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfkimbell%2Fcloud-file-sharing-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfkimbell%2Fcloud-file-sharing-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfkimbell%2Fcloud-file-sharing-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfkimbell","download_url":"https://codeload.github.com/mfkimbell/cloud-file-sharing-service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243855663,"owners_count":20358847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-lambda","boto3","ec2","flask","iam","mysql","rds","s3","ses","sns"],"created_at":"2024-11-22T10:21:18.289Z","updated_at":"2026-04-28T16:01:56.122Z","avatar_url":"https://github.com/mfkimbell.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cloud-file-upload\n\n\u003cimg width=\"1006\" alt=\"cloud file workflow\" src=\"https://github.com/mfkimbell/cloud-file-sharing-service/assets/107063397/24d39502-8fbc-4e58-b2b4-5bb51a40998c\"\u003e\n\n\n\nIn this application, a user can\ncreate an account and upload a profile picture. This will save their information on RDS in a MySQL database, it will then send an email to my personal email telling me a user has created an account. A user can enter their credentials and allow them to login to the main webapp. A user can then select up to 5 emails to upload a file to. Each address will recieve an email with a link that allows them to download the uploaded file from S3.\n\n---\n\n# Tools Used:\n* `Flask` Used to operate the webserver\n* `Boto3` Python SDK used to connecto to S3 buckets and Lambda functions (can do other aws services)\n* `S3` Store profile pictures and uploaded files\n* `AWS Lambda` Calls SNS and SES functions\n* `SNS` Sends email to webpage owner when new account is created\n* `SES` Sends file download link to specified emails\n* `MySQL/RDS` Store user credentials, profile pictures, and file uploads\n* `EC2` Host Flask WebServer/application\n* `IAM` Set access and identity permissions that we use when connecting with Boto3\n---\nWhen people access the application, they can only add files if they've added credentials to the MySQL database in AWS RDS. Anyone can connect, as by default, the \"/add\" route has permissions built into it to add a username and password to S3, my email is alerted after the function is invoked.\n\n### lambda function: lambdaSNS\n\n``` python\nimport boto3\ndef lambda_handler(event, context):\nACCESS_KEY = \"AKIA3SR6ZX6FT4OAXVPJ\"\nSECRET_KEY = \"*******************\"\nAWS_REGION = \"us-east-1\"\nemail = event.get(\"email\")\nsns_client = boto3.client(\n\"sns\",\nregion_name=AWS_REGION,\naws_access_key_id=ACCESS_KEY,\naws_secret_access_key=SECRET_KEY,\n)\n# do i need aws_access_key_id = ACCESS KEY or SECRET_KEY\nsns_client.publish(\nTopicArn=\"arn:aws:sns:us-east-1:795774402443:mksns\",\nMessage=\"New user Added: \" + email,\nSubject=\"New User\",\n)\n```\n---\n\nAfter that, they can use the \"/login\" route, which allows the user to input data and call the \"/uploadSend\" endpoint. This stores data in s3, keeps track of the file name in the MySQL database, and invokes my lambda function \"lambdaSendFileLink\" which sends an email to the entered emails that contains a link. \n\n### lambda function: lambdaSendFileLink\n\n``` python\nimport boto3\nimport json\nACCESS_KEY = \"AKIA3SR6ZX6FT4OAXVPJ\"\nSECRET_KEY = \"********************\"\nAWS_REGION = \"us-east-1\"\ndef lambda_handler(event, context):\nACCESS_KEY = \"AKIA3SR6ZX6FT4OAXVPJ\"\nSECRET_KEY = \"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\"\nAWS_REGION = \"us-east-1\"\nemails = event.get(\"email\")\nbotoS3 = boto3.client(\n\"s3\",\nregion_name=AWS_REGION,\naws_access_key_id=ACCESS_KEY,\naws_secret_access_key=SECRET_KEY,\n)\nbotoSES = boto3.client(\"ses\", region_name=\"us-east-1\")\nkey = event.get(\"filename\")\nbucket = \"mkcloudbucket\"\nurl = f\"https://{bucket}.s3.amazonaws.com/{key}\"\nresponse = botoSES.send_email(\nDestination={\"ToAddresses\": emails},\nMessage={\n\"Body\": {\n\"Text\": {\n\"Charset\": \"UTF-8\",\n\"Data\": \"Your file is ready to download: \" + url,\n}\n},\n\"Subject\": {\n\"Charset\": \"UTF-8\",\n\"Data\": \"Test email\",\n},\n},\nSource=\"mkimbell@uab.edu\",\n)\nprint(response)\nreturn {\n\"statusCode\": 200,\n\"body\": json.dumps(\n\"Email Sent Successfully. MessageId is: \" + response[\"MessageId\"]\n),\n}\n```\n\n---\n\n1. Main page login\n2. Create account page\n3. File upload app page\n\n\u003cimg width=\"607\" alt=\"display\" src=\"https://github.com/mfkimbell/cloud-file-sharing-service/assets/107063397/55885c0d-49e2-484a-a4b9-a19b043f3d1d\"\u003e\n\n---\n\nThis is the notification for new users:\n\u003cimg width=\"1012\" alt=\"Screenshot 2023-09-29 at 1 00 21 PM\" src=\"https://github.com/mfkimbell/cloud-file-sharing-service/assets/107063397/ee5b7ae7-5e43-42aa-8ea6-68ad90b97463\"\u003e\n\n\n---\n\nThis is what is recieved when someone shares a file:\n  \n\u003cimg width=\"669\" alt=\"email\" src=\"https://github.com/mfkimbell/cloud-file-sharing-service/assets/107063397/b6fa9a79-4367-48f8-a0e2-98c87c25e8e8\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfkimbell%2Fcloud-file-sharing-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfkimbell%2Fcloud-file-sharing-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfkimbell%2Fcloud-file-sharing-service/lists"}