Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jan 31 2019 14:07
    jugalde-r7 commented #2352
  • Jan 31 2019 09:36
    takeyourhatoff commented #2427
  • Jan 31 2019 09:35
    takeyourhatoff commented #2427
  • Jan 30 2019 23:10
    diehlaws commented #2427
  • Jan 30 2019 23:09
    diehlaws labeled #2427
  • Jan 30 2019 23:09
    diehlaws labeled #2427
  • Jan 30 2019 21:47
    diehlaws labeled #2352
  • Jan 30 2019 21:47
    diehlaws commented #2352
  • Jan 30 2019 21:12
    diehlaws commented #2342
  • Jan 30 2019 20:58
    diehlaws assigned #2427
  • Jan 30 2019 20:54
    diehlaws unlabeled #81
  • Jan 30 2019 20:54
    diehlaws unlabeled #142
  • Jan 30 2019 20:54
    diehlaws unlabeled #618
  • Jan 30 2019 20:54
    diehlaws unlabeled #81
  • Jan 30 2019 20:54
    diehlaws unlabeled #142
  • Jan 30 2019 20:54
    diehlaws unlabeled #619
  • Jan 30 2019 20:54
    diehlaws unlabeled #628
  • Jan 30 2019 20:54
    diehlaws unlabeled #568
  • Jan 30 2019 20:54
    diehlaws unlabeled #521
  • Jan 30 2019 20:54
    diehlaws unlabeled #487
"ID": {
S: aws.String(<custom type here>),
Hi, func (URLSigner) Sign If I specify a custom domain as the argument url for this method, will it still return the signed URL?
For example, "https://xxx.co.us" + s3ObjectKey.
zhu jun
InvalidClientTokenId: The security token included in the request is invalid.
how can i get the true tiken
Cristian Măgherușan-Stanciu

did anyone try to parse the pricing API data in into a native Go object? I'm having a hard time with this

{"product":{"productFamily":"Storage","attributes":{"storageMedia":"SSD-backed","maxThroughputvolume":"1000 MiB/s","volumeType":"Provisioned IOPS","maxIopsvolume":"64000","servicecode":"AmazonEC2","usagetype":"EBS:VolumeUsage.io2","locationType":"AWS Region","volumeApiName":"io2","location":"US East (N. Virginia)","servicename":"Amazon Elastic Compute Cloud","maxVolumeSize":"16 TiB","operation":""},"sku":"6V576P37PS7K7KYU"},"serviceCode":"AmazonEC2","terms":{"OnDemand":{"6V576P37PS7K7KYU.JRTCKXETXF":{"priceDimensions":{"6V576P37PS7K7KYU.JRTCKXETXF.6YS6EN2CT7":{"unit":"GB-month","endRange":"Inf","description":"$0.125 per GB-month of Provisioned IOPS SSD (io2)  provisioned storage - US East (Northern Virginia)","appliesTo":[],"rateCode":"6V576P37PS7K7KYU.JRTCKXETXF.6YS6EN2CT7","beginRange":"0","pricePerUnit":{"USD":"0.1250000000"}}},"sku":"6V576P37PS7K7KYU","effectiveDate":"2021-07-01T00:00:00Z","offerTermCode":"JRTCKXETXF","termAttributes":{}}}},"version":"20210709001917","publicationDate":"2021-07-09T00:19:17Z"}

and json-to-go gives this output

type AutoGenerated struct {
    Product struct {
        ProductFamily string `json:"productFamily"`
        Attributes    struct {
            StorageMedia        string `json:"storageMedia"`
            MaxThroughputvolume string `json:"maxThroughputvolume"`
            VolumeType          string `json:"volumeType"`
            MaxIopsvolume       string `json:"maxIopsvolume"`
            Servicecode         string `json:"servicecode"`
            Usagetype           string `json:"usagetype"`
            LocationType        string `json:"locationType"`
            VolumeAPIName       string `json:"volumeApiName"`
            Location            string `json:"location"`
            Servicename         string `json:"servicename"`
            MaxVolumeSize       string `json:"maxVolumeSize"`
            Operation           string `json:"operation"`
        } `json:"attributes"`
        Sku string `json:"sku"`
    } `json:"product"`
    ServiceCode string `json:"serviceCode"`
    Terms       struct {
        OnDemand struct {
            SixV576P37PS7K7KYUJRTCKXETXF struct {
                PriceDimensions struct {
                    SixV576P37PS7K7KYUJRTCKXETXF6YS6EN2CT7 struct {
                        Unit         string        `json:"unit"`
                        EndRange     string        `json:"endRange"`
                        Description  string        `json:"description"`
                        AppliesTo    []interface{} `json:"appliesTo"`
                        RateCode     string        `json:"rateCode"`
                        BeginRange   string        `json:"beginRange"`
                        PricePerUnit struct {
                            Usd string `json:"USD"`
                        } `json:"pricePerUnit"`
                    } `json:"6V576P37PS7K7KYU.JRTCKXETXF.6YS6EN2CT7"`
                } `json:"priceDimensions"`
                Sku            string    `json:"sku"`
                EffectiveDate  time.Time `json:"effectiveDate"`
                OfferTermCode  string    `json:"offerTermCode"`
                TermAttributes struct {
                } `json:"termAttributes"`
            } `json:"6V576P37PS7K7KYU.JRTCKXETXF"`
        } `json:"OnDemand"`
    } `json:"terms"`
    Version         string    `json:"version"`
    PublicationDate time.Time `json:"publicationDate"`

any clues how to handle the OnDemand and PriceDimensions structs?

Cristian Măgherușan-Stanciu
I ended up doing some regex replaces on those SKU values before unmarshaling, this is so fugly
Cristian Măgherușan-Stanciu
I finally got some code able to parse the EBS pricing and expose it in a more user-friendly format, if anyone is interested in this please let me know, I will eventually open source it but I can share it earlier upon demand
Pragyan Aryal
Hello Can anyone help me using Cognito Admin API using aws-sdk-go-v2
I get the error no EC2 IMDS role found
I can Create users using the API, client.SignUp
But, cannot get the user using API, client.AdminGetUser
Yuval Lifshitz
I'm looking for a way to set the signature version explicitly for a client. found documentation for various SDKs, but not for golang

I am trying to use AWS SDK for Go to implement S3 apis to connect with third party storage provider (Dell OneFS) who support S3 API. First in place, is AWS SDK is tightly coupled with AWS or it can be used to connect with any storage provider who support S3 API? If so, can someone help me to configuring the target host and other details?


Yuval Lifshitz
you can connect to any storage that supports S3. e.g. i use it to connect to object storage gateway of Ceph (https://ceph.io/en/)
I use the NewSession() call from: github.com/aws/aws-sdk-go/aws/session
you pass it a NewConfig() with endpoint, credentials, region, and all other parameters pointing to your storage provider
Thank you Yuval, for the response on this. Let me check and confirm on this.
Yuval, it's working... great thanks for your help on this... it is really appreciated...
Hi yuvalif, when I am uploading document bucket name is appended to the Put request. Getting error "RequestError: send request failed
caused by: Put "http://bucketname.hostname.com:9020/uploaddoc.pdf": dial tcp: lookup bucketname.hostname.com: no such host"
Did you face such problem? how to avoid appending bucketname in the url? or is there any other work around?
Yuval Lifshitz
yes , had this problem :-)
use: WithS3ForcePathStyle(true) in the config, so that the bucket name would appear in the "path" and not the "host"
@yuvalif you are the saviour :) it worked. I am not getting what they are coming to say when I am reading aws documentation for this method. I felt the documentation is not clear... Thanks a lot for the help on this...
@yuvalif , I am setting some user defined metadata while uploading a file. How to retrieve these metadata using Go SDK?
Yuval Lifshitz
@JK sorry, don't know about that
Cristian Măgherușan-Stanciu
Is there any tooling to help with migration of a relatively large project from v1 to v2?
Hi, does aws-sdk-go accepts . (dot) as part of keys ?
How to pass session token while creating new session ?
Nilesh Akhade
Can someone help me with documentation on guidelines for retrying s3 upload on error?
  • What kind of errors is retriable?
  • Detecting "SlowDown" and stopping retries?
    uploader := s3manager.NewUploader(sess)
    _, err := uploader.Upload()
1 reply
we are so sorry to hear about your situation you can contact eth@consultant.com for any issue that’s occur your
Stefan Sundin
Hello all. Sad to see this channel seemingly be a bit dead. I was hoping if someone on the AWS SDK team could answer this stackoverflow that I posted 20 days ago: https://stackoverflow.com/questions/69692732/how-to-call-the-values-function-in-aws-sdk-go-v2
Since stackoverflow is suggested in the SDK readme, I was hoping that some people from AWS would be monitoring it, but it seems like this is not the case either. I am trying to avoid opening a github issue.
2 new tools built using aws-sdk-go and made opensource :-
Please have a look and let me know your thoughts!! Any feedback/suggestions are highly appreciated

Hi there!
I've just started using Lambda and Go thus sorry for newbie questions.

So the question:
I have a lambda that may return errors with different status codes: 400, 404, 500.
On top of it I have an API Gateway that right now always returns me 502 when lambda returns any error.
I've failed to map it through response templates.

Could someone please give me a hand with this? What is a proper way to manage errors handling?