Giter Site home page Giter Site logo

awswift's Introduction

AWSwift

A Native Swift 3 SDK for AWS Services, for use both on device and on servers! Supports iOS, macOS, tvOS and Linux.

Aims

We believe that Swift has the potential to be everywhere - from running the applications on your mobile devices, to powering backends on servers and everything from scripting to websites in between. AWS is the most popular cloud computing provider and in order for us to be able to interact with it on any platform we need a native SDK. Whether it be deploying EC2 instances from scripts, to interacting with massive DynamoDB databases, we want AWSwift to do it all!

Supported Services

The list of AWS services we currently support are:

  • DynamoDB

Installation

AWSwift can be installed using Cocoapods and the Swift Package Manager.

Cocoapods

Coming soon...

Swift Package Manager

To use AWSwift, just include it as a dependency in your Package.swift file:

let package = Package(
    name: "MyPackage",
    dependencies: [
        .Package(url: "https://github.com/brokenhandsio/AWSwift.git", majorVersion: 0)
    ]
)

Usage

DynamoDB

Create an instance of the ConnectionManager with your access ID and access Key Secret and specify the region you wish to connect to:

let connectionManager = ConnectionManager(accessId: accessID, accessSecret: accessSecret, region: .euWest1)

Create a DynamoDbTable with the details for the table:

let petsTable = DynamoDbTable(tableName: "Pets", partitionKey: "AnimalType", sortKey: "Name", connectionManager: connectionManager)

Then perform the action that you want on the table. For a get, you need a key and use it as so:

let key = DynamoDbTableKeyValues(partitionKeyValue: "Dog", sortKeyValue: "Fred")

petsTable.getItem(keyValues: key) { (response, errror) in
    print("Response was \(response)")
}

Vapor Providers

awswift's People

Contributors

0xtim avatar

Watchers

James Cloos avatar yasuda.yuya avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.