All Projects → ex-aws → ex_aws_s3

ex-aws / ex_aws_s3

Licence: other
No description or website provided.

Programming Languages

elixir
2628 projects

Labels

Projects that are alternatives of or similar to ex aws s3

IQService
iOS端模块间通信解决方案。
Stars: ✭ 17 (-85.95%)
Mutual labels:  service
ctx
🍭Ctx (Context) 是一个服务模块化上下文框架。
Stars: ✭ 38 (-68.6%)
Mutual labels:  service
terraform-aws-ecs-alb-service-task
Terraform module which implements an ECS service which exposes a web service via ALB.
Stars: ✭ 108 (-10.74%)
Mutual labels:  service
kivy service osc
simple UI/Service communication using osc on python-for-android
Stars: ✭ 53 (-56.2%)
Mutual labels:  service
XperiaServiceMenu
An Android app that allows owners of a Sony Xperia, to easily open the service menu app via a tap of a button instead of having to type a code into the phone's dialer.
Stars: ✭ 14 (-88.43%)
Mutual labels:  service
jetson-monitor
🚨 Jetson is an HTTP monitoring service used to notify by various messaging platforms such as Slack and Telegram
Stars: ✭ 45 (-62.81%)
Mutual labels:  service
dklb
Expose Kubernetes services and ingresses through EdgeLB.
Stars: ✭ 13 (-89.26%)
Mutual labels:  service
service-systemd
Setup a node.js app as systemd service.
Stars: ✭ 35 (-71.07%)
Mutual labels:  service
easymail
Easy way to install a mail server.
Stars: ✭ 60 (-50.41%)
Mutual labels:  service
WaveSDK
WaveSDK, 让音乐跟上你的步频,根据跑步记录,智能推送歌曲,可高度化定制二次开发,为Android开发者提供了简单,快捷的接口 跑嗨乐.
Stars: ✭ 36 (-70.25%)
Mutual labels:  service
shared-loadbalancer
Demo for 2018 KubeCon NA
Stars: ✭ 22 (-81.82%)
Mutual labels:  service
ngx-chat
Angular XMPP Client & Chat UI
Stars: ✭ 30 (-75.21%)
Mutual labels:  service
beauties
Essential personal Internet services
Stars: ✭ 29 (-76.03%)
Mutual labels:  service
rpc
RPC-like client-service implementation over messaging queue
Stars: ✭ 26 (-78.51%)
Mutual labels:  service
gotor
This program provides efficient web scraping services for Tor and non-Tor sites. The program has both a CLI and REST API.
Stars: ✭ 97 (-19.83%)
Mutual labels:  service
gogen
Command-line tool to generate GO applications and libraries
Stars: ✭ 17 (-85.95%)
Mutual labels:  service
helium
Helium is a small, simple, modular constructor with some pre-built components for your convenience.
Stars: ✭ 67 (-44.63%)
Mutual labels:  service
blazar
Reservation Service for OpenStack. Mirror of code maintained at opendev.org.
Stars: ✭ 60 (-50.41%)
Mutual labels:  service
server-framework
纯C的分布式服务器框架通用模板,跨平台,模块动态加载,tcp/可靠UDP,协程RPC,日志,集群建立
Stars: ✭ 24 (-80.17%)
Mutual labels:  service
svgify
service to threshold-svg your images
Stars: ✭ 22 (-81.82%)
Mutual labels:  service

ExAws.S3

CI Module Version Hex Docs Total Download License Last Updated

Service module for https://github.com/ex-aws/ex_aws

Installation

The package can be installed by adding :ex_aws_s3 to your list of dependencies in mix.exs along with :ex_aws, your preferred JSON codec / HTTP client, and optionally :sweet_xml to support operations like list_objects that require XML parsing.

def deps do
  [
    {:ex_aws, "~> 2.0"},
    {:ex_aws_s3, "~> 2.0"},
    {:poison, "~> 3.0"},
    {:hackney, "~> 1.9"},
    {:sweet_xml, "~> 0.6.6"}, # optional dependency
  ]
end

Operations on AWS S3

Basic Operations

The vast majority of operations here represent a single operation on S3.

Examples

S3.list_objects("my-bucket") |> ExAws.request! #=> %{body: [list, of, objects]}
S3.list_objects("my-bucket") |> ExAws.stream! |> Enum.to_list #=> [list, of, objects]

S3.put_object("my-bucket", "path/to/bucket", contents) |> ExAws.request!

Higher Level Operations

There are also some operations which operate at a higher level to make it easier to download and upload very large files.

Multipart uploads

"path/to/big/file"
|> S3.Upload.stream_file
|> S3.upload("my-bucket", "path/on/s3")
|> ExAws.request #=> {:ok, :done}

See ExAws.S3.upload/4 for options

Download large file to disk

S3.download_file("my-bucket", "path/on/s3", "path/to/dest/file")
|> ExAws.request #=> {:ok, :done}

More high level functionality

Task.async_stream makes some high level flows so easy you don't need explicit ExAws support.

For example, here is how to concurrently upload many files.

upload_file = fn {src_path, dest_path} ->
  S3.put_object("my_bucket", dest_path, File.read!(src_path))
  |> ExAws.request!
end

paths = %{"path/to/src0" => "path/to/dest0", "path/to/src1" => "path/to/dest1"}

paths
|> Task.async_stream(upload_file, max_concurrency: 10)
|> Stream.run

Bucket as host functionality

Examples

opts = [virtual_host: true, bucket_as_host: true]

ExAws.Config.new(:s3)
|> S3.presigned_url(:get, "bucket.custom-domain.com", "foo.txt", opts)

{:ok, "https://bucket.custom-domain.com/foo.txt"}

Configuration

The scheme, host, and port can be configured to hit alternate endpoints.

For example, this is how to use a local minio instance:

# config.exs
config :ex_aws, :s3,
  scheme: "http://",
  host: "localhost",
  port: 9000

License

The MIT License (MIT)

Copyright (c) 2014 CargoSense, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].