// RawReqWithConf will sign and transmit the request to the AWS DynamoDB endpoint. // reqJSON is the json request // amzTarget is the dynamoDB endpoint // c is the configuration struct // returns []byte respBody, string aws reqID, int http code, error func RawReqWithConf(reqJSON []byte, amzTarget string, c *conf.AWS_Conf) ([]byte, string, int, error) { if !conf.IsValid(c) { return nil, "", 0, errors.New("auth_v4.RawReqWithConf: conf not valid") } // shadow conf vars in a read lock to minimize contention var our_c conf.AWS_Conf cp_err := our_c.Copy(c) if cp_err != nil { return nil, "", 0, cp_err } return rawReqAll( reqJSON, amzTarget, our_c.UseIAM, our_c.Network.DynamoDB.URL, our_c.Network.DynamoDB.Host, our_c.Network.DynamoDB.Port, our_c.Network.DynamoDB.Zone, our_c.IAM.Credentials.Secret, our_c.IAM.Credentials.AccessKey, our_c.IAM.Credentials.Token, our_c.Auth.Secret, our_c.Auth.AccessKey) }