Giter Club home page Giter Club logo

dynago's People

Contributors

crast avatar h3h avatar ralph-tice avatar reedom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dynago's Issues

Support (un)marshal regular Go types

Hello,

Love this library but can't overcome the manual work that is required to convert to Go types. How do you suggest I convert from a dynago.Document to a domain object that I create?

Do you plan on implementing marshal/unmarshal? Thanks.

Add git tags for gopkg?

Hi,
We're using dynago for a project and have really enjoyed the API in comparison to aws-go. Thank you open sourcing this project!
It would be very helpful for us if you could add branch tags so that we could use a versioned import from gopkg. It just involves adding tags for versions, like v1.0.0. We'd rather avoid Godep if possible.
Thanks for your consideration.

Support for Creating dynago client with AWS STS credentials

Hi,

Dynago Library greatly solves the problem of reading/writing data with normal json from/to Dynamodb. One issue I am facing is to create dynago client with temporary credentials received from AWS STS while assuming role. The error says :

dynago.Error(ErrorAuth): UnrecognizedClientException: The security token included in the request is invalid.

The following code snippet shows what and how I am trying to achieve:

sess := session.Must(session.NewSessionWithOptions(session.Options{
       SharedConfigState: session.SharedConfigEnable,}))
svc := sts.New(sess)
input := &sts.AssumeRoleInput{
RoleArn: aws.String("arn:aws:iam::<ACCOUNT-ID>:role/<ROLE-NAME>"),
RoleSessionName: aws.String("Bob"),
}
result, err := svc.AssumeRole(input)
client := dynago.NewAwsClient("<REGION-NAME>", *result.Credentials.AccessKeyId, *result.Credentials.SecretAccessKey)

Is there an alternate way to create dynago client with temporary credentials? If not, do you plan to supoort this case?

Thanks & Regards
Aprimit Garg

Proposal: Refactor MakeRequest

Currently MakeRequest returns a byte array and relies on AWS setting the ContentLength header in their response. I've encountered a scenario where Amazon returns a large amount of data (a Scan request) and fails to set the ContentLength header. I dumped the contents of the request and it had all the data requested.

Technically this is a Amazon issue but I think utilizing encoders from json will alleviate it. The Local DynamoDB instance is more consistent in setting all the necessary headers which is why your tests haven't caught this.

I'd like to change MakeRequest to return a io.ReadCloser and let json.Decoder handle the body. I'm going to implement this change.

This is just a headsup in case you have any thoughts on it. All the changes are internal so there would be no interface errors.

signature signing error

Hi,
(previously did all testing with DynamoDB local and just now encountered this)

I receive an InvalidSignatureException on all requests made with Dynago. Using the same credentials with aws-go yields a a correct response. I patched both libraries to compare the HTTP headers and discovered that they are not the same set.

Example programs: https://gist.github.com/natebrennand/bf5fc06c23ae98f7c7dd

Dynago:

  Authorization: [
    AWS4-HMAC-SHA256 Credential=XXXX/20150723/us-west-1/dynamodb/aws4_request,
    SignedHeaders=content-type;host;x-amz-date;x-amz-target,
    Signature=YYYY
  ]
  X-Amz-Target: [DynamoDB_20120810.DescribeTable]
  Content-Type: [application/x-amz-json-1.0]
  Host: [dynamodb.us-west-1.amazonaws.com]
  X-Amz-Date: [20150723T234215Z]

aws-go:

  Authorization: [
    AWS4-HMAC-SHA256 Credential=XXXX/20150723/us-west-1/dynamodb/aws4_request,
    SignedHeaders=accept-encoding;host;x-amz-date;x-amz-target,
    Signature=ZZZZZ
  ]
  X-Amz-Target: [DynamoDB_20120810.DescribeTable]
  Content-Type: [application/x-amz-json-1.0]
  X-Amz-Date: [20150723T234215Z]
  Accept-Encoding: [identity]
  Content-Length: [26]
  User-Agent: [aws-sdk-go/0.6.7]
  X-Amz-Content-Sha256: [WWWWW]

The requests were made in the same second. The signatures in the Authorization header were not identical.
Do you have any advice on how to remedy this?

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.