{"id":21846632,"url":"https://github.com/binarybirds/liquid-aws-s3-driver","last_synced_at":"2025-07-20T20:30:55.424Z","repository":{"id":49420709,"uuid":"259553302","full_name":"BinaryBirds/liquid-aws-s3-driver","owner":"BinaryBirds","description":"AWS S3 driver implementation for the LiquidKit file storage solution, based on the Soto for AWS project.","archived":true,"fork":false,"pushed_at":"2023-05-23T07:54:29.000Z","size":95450,"stargazers_count":9,"open_issues_count":0,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-18T21:04:22.038Z","etag":null,"topics":["aws","aws-sdk-swift","file-storage","liquid-kit","s3","swift-nio"],"latest_commit_sha":null,"homepage":"https://feathercms.com/","language":"Swift","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BinaryBirds.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-28T06:38:59.000Z","updated_at":"2023-11-19T19:02:55.000Z","dependencies_parsed_at":"2023-02-10T11:31:05.534Z","dependency_job_id":null,"html_url":"https://github.com/BinaryBirds/liquid-aws-s3-driver","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/BinaryBirds/liquid-aws-s3-driver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryBirds%2Fliquid-aws-s3-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryBirds%2Fliquid-aws-s3-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryBirds%2Fliquid-aws-s3-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryBirds%2Fliquid-aws-s3-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BinaryBirds","download_url":"https://codeload.github.com/BinaryBirds/liquid-aws-s3-driver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryBirds%2Fliquid-aws-s3-driver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266193065,"owners_count":23890719,"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-sdk-swift","file-storage","liquid-kit","s3","swift-nio"],"created_at":"2024-11-27T23:14:49.472Z","updated_at":"2025-07-20T20:30:50.414Z","avatar_url":"https://github.com/BinaryBirds.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LiquidAwsS3Driver\n\nAWS S3 driver implementation for the [LiquidKit](https://github.com/BinaryBirds/liquid-kit) file storage solution, based on the [Soto for AWS](https://github.com/soto-project/soto) project.\n\nLiquidKit and the AWS S3 driver is also compatible with Vapor 4 through the [Liquid](https://github.com/BinaryBirds/liquid) repository, that contains Vapor specific extensions.\n\n\n## Key resolution for S3 objects\n\nKeys are being resolved using a the bucket and the region name, with the standard AWS structure:\n\n- url = \"https://\" + [bucket name] + \".s3-\" + [region name] + \"amazonaws.com/\" + [key]\n\nAlternatively you can use a custom endpoint. In that case the endpoint will be extended with the bucket name and key.\n\n- url = [custom endpoint] + [bucket name] + [key]\n\n\ne.g. \n\n- bucketName = \"testbucket\"\n- regionName = \"us-west-1\"\n- key = \"test.txt\"\n\n- resolvedUrl = \"https://testbucket.s3-us-west-1.amazonaws.com/test.txt\"\n\n\n## Credentials\n\nIt is possible to configure credentials via multiple methods, by default the driver will try to load the credentials from the shared credential file.\n\nYou can read more about the configuration in the AWS SDK Swift [readme](https://github.com/swift-aws/aws-sdk-swift).\n\nTo get started with a default shared credential file, place the following values into the `~/.aws/credentials` file.\n\n```ini\n[default]\naws_access_key_id = YOUR_AWS_ACCESS_KEY_ID\naws_secret_access_key = YOUR_AWS_SECRET_ACCESS_KEY\n```\n\n\n## Usage with SwiftNIO\n\n\nAdd the required dependencies using SPM:\n\n```swift\n// swift-tools-version:5.3\nimport PackageDescription\n\nlet package = Package(\n    name: \"myProject\",\n    platforms: [\n       .macOS(.v10_15)\n    ],\n    dependencies: [\n        .package(url: \"https://github.com/binarybirds/liquid\", from: \"1.2.0\"),\n        .package(url: \"https://github.com/binarybirds/liquid-aws-s3-driver\", from: \"1.2.0\"),\n    ],\n    targets: [\n        .target(name: \"App\", dependencies: [\n            .product(name: \"Liquid\", package: \"liquid\"),\n            .product(name: \"LiquidAwsS3Driver\", package: \"liquid-aws-s3-driver\"),\n        ]),\n    ]\n)\n```\n\nA basic usage example with SwiftNIO:\n\n```swift\n/// setup thread pool\nlet elg = MultiThreadedEventLoopGroup(numberOfThreads: 1)\nlet pool = NIOThreadPool(numberOfThreads: 1)\npool.start()\n\n/// create fs  \nlet fileio = NonBlockingFileIO(threadPool: pool)\nlet storages = FileStorages(fileio: fileio)\nstorages.use(.awsS3(region: .uswest1, bucket: \"testbucket\"), as: .awsS3)\nlet fs = storages.fileStorage(.awsS3, logger: .init(label: \"[test-logger]\"), on: elg.next())!\n\n/// test file upload\nlet key = \"test.txt\"\nlet data = Data(\"file storage test\".utf8)\nlet res = try fs.upload(key: key, data: data).wait()\n\n/// https://testbucket.s3-us-west-1.amazonaws.com/test.txt\nlet url = req.fs.resolve(key: key)\n\n/// delete key\ntry req.fs.delete(key: key).wait()\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarybirds%2Fliquid-aws-s3-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinarybirds%2Fliquid-aws-s3-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarybirds%2Fliquid-aws-s3-driver/lists"}