Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 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
JaeHoon Kim
@LumpKim
I'm trying to call ec2.DescribeInstances() function, but only empty brace returned. How can I fix this?
sess := session.Must(session.NewSessionWithOptions(session.Options{
    SharedConfigState: session.SharedConfigEnable,
}))

// Create new EC2 client
ec2Svc := ec2.New(sess)

input := &ec2.DescribeInstancesInput{
    InstanceIds: []*string{aws.String(instanceID)},
}

// Call to get detailed information on each instance
result, err := ec2Svc.DescribeInstances(input)
if err != nil {
    fmt.Println("Error", err)
} else {
    fmt.Println(result)
}

It returns like below:

{

}

I found aws/aws-sdk-go#1449 but it doesn't have a solution.
Any help would be much appreciated.

Sh3rm1nat0r
@Sh3rm1nat0r_twitter

Are CodeGuru Profiler and Viewer available in Golang?

Nowhere on the homepage showcasing this tool (https://aws.amazon.com/codeguru/) is mentioned support for Golang. But I saw these two SDKs links and I am now confused on whether this actually works with Golang or not
https://docs.aws.amazon.com/sdk-for-go/api/service/codegurureviewer/
https://docs.aws.amazon.com/sdk-for-go/api/service/codeguruprofiler/

Nag
@nfornag
Hi All, can anybody help me creating session with assume role?
I have only role arn attached to my ec2 instace, I am able to describe-instances with that role by using awscli, but not able to build session with golang sdk
Nag
@nfornag
Hi All, following is my code
package main

import (
//    "flag"
    "fmt"

    "github.com/aws/aws-sdk-go/aws"
//    "github.com/aws/aws-sdk-go/aws/credentials"
    "github.com/aws/aws-sdk-go/aws/credentials/stscreds"
    "github.com/aws/aws-sdk-go/aws/session"
    "github.com/aws/aws-sdk-go/service/ec2"
    log "github.com/sirupsen/logrus"
)

func main() {
    var arn string
    var region string
    region = "us-east-1"
    arn="arn:aws:iam::*******:role/*******-role"

    sess := session.Must(session.NewSession())
    creds := stscreds.NewCredentials(sess, arn)

    fmt.Println("This should print the ec2 instances available in your account.  If you passed in an ARN, it will print the S3 buckets in the Assumed Role account.")
    ec3svc := ec2.New(session.New(), &aws.Config{Credentials: creds, Region: aws.String(region)})
    var input *ec2.DescribeInstancesInput
    resp, err := ec3svc.DescribeInstances(input)
    if err != nil {
        fmt.Println("there was an error listing instances in", err.Error())
        log.Fatal(err.Error())
    }else {
        fmt.Println("Success", resp)
    }
}

I am getting the below error

there was an error listing instances in InvalidClientTokenId: The security token included in the request is invalid.
    status code: 403, request id: 65aa93eb-dd15-46be-8a92-a1e32b6aa1b5
FATA[0000] InvalidClientTokenId: The security token included in the request is invalid.
    status code: 403, request id: 65aa93eb-dd15-46be-8a92-a1e32b6aa1b5

Can somebody help to fix this issue...?

Olli Raula
@Bysmyyr
Hi, if I need to stream s3 download, is there some lib or do I need to write it from scratch
Oshadha Gunawardena
@oshadhaviraj_twitter
Is there a way we can invalidate a token using the aws cognito golang sdk?
Pravin Ranjan
@PravinRanjan10
AuthorizationHeaderMalformed: The authorization header is malformed; the region 'ap-south-1' is wrong; expecting 'us-east-1'
status code: 400, request id: A6927F05123508CF, host id: vh25Ir7uVrT7BWyxPLfgPJkqLVnK2qC3sCQoTkM6rUPNgcdpfB2YVjufoRugTLQTspXdETjaRzE=
Any idea about this error?
Vivek Singh
@viveksinghggits
Hi,
I was not able to find an API that can wait for Aurora DB cluster to successfully deleted. What should be a proper way to do this.
What I am doing as of now is, use DescribeDBClusters to get the instances that are being run by the Aurora cluster, delete them (DeleteDBInstance) and then run DeleteDBCluster to actually delete the cluster. But the problem is I don't see an API that can wait for that cluster to be deleted.
@PravinRanjan10 did you try changing the region to us-east-1
1 reply
Petro
@pgbce
Looking for a basic lambda golang producer.
I've seen the implementation using https://github.com/a8m/kinesis-producer. But I'm looking for a basic implementation for PutRecord.
I keep getting a timeout between lambda->kinesis stream.
I've went through this - https://aws.amazon.com/premiumsupport/knowledge-center/kinesis-data-streams-lambda-invocation/ and the current lambda function execution time is 90s and memory is at 512mb (tried with 1024mb)...
Full Kinesis Permissions seem to be set on lambda execution role...
DescribeStream also fails. So it keeps pointing me back to Permissions but nothing in CloudWatch..
*the kinesis client is set, able to log the details out.
Chih-Chieh
@cch0
Currently running into issue with error message SignatureDoesNotMatch: Credential should be scoped to a valid region, not 'us-gov-east-1' when using Terragrunt trying to create IAM policy in Gov. This line may (?) suggest we can only use us-gov-west-1 for IAM resources. Looking for guidance on how I can either create or reference IAM resources if I am authenticated to us-gov-east-1 region.
Adnan Rashid
@arashid290
hi - does anyone here use selenium? any ideas how to get extensions to load on Chrome when running an automated test via the CLI?
ilu123
@ilu123
hello, I have setup s3 endpoint for my VPC and I can download the file object directly via Ec2's curl without creds, then I wanna call the s3 GetObject API in the EC2 using this SDK without setting creds, but it got error: operation error S3: GetObject, failed to sign request: failed to retrieve credentials: no EC2 IMDS role found, operation error ec2imds: GetMetadata, http response error StatusCode: 404, request to EC2 IMDS failed. Can anyone help me? thanks
salim6655
@salim6655
Hi
Anyone please assiist with "func (c CloudFormation) ListStacks(input ListStacksInput) (*ListStacksOutput, error)"
what is the "input" parameter to be used here
any examples would be of help
kumar-shrey
@kumar-shrey
hi, I am looking for API to consume events from event bridge. I am using Redshift Data API ExecuteStatement with WithEvent flag as true. and want to listen to completion event. Any example would be helpful
Lulu
@404cn
hi, I am trying to use cloudwatch event to monit Exposed AccessKey, and looking for API to get this info if this event is trigger.
Does this sdk have that func?
Thoufic
@LEDgEr67
Hi, I am trying to create a Lambda function that is triggered through dynamoDB Streams on data modify and updating new data to the Elastic Search in "Golang" can anyone help me with boiler plate code
vincent youmans
@vinceyoumans
I am looking for an example golang cli app ( using cobra for example) that makes a call to a GoLang Lambda. anything out there?
pradeepp28
@pradeepp28
Currently I am using aws s3manager BatchUploadIterator to upload all files we have in multipart form, how do we do this in aws-sdk-go-v2?
I searched the documentation, couldn't find the similar one in aws-sdk-go-v2
jimmason1001
@jimmason1001
how do I retrieve the data from the test full stack serverless stack?
Bipin
@BipinRPandey_twitter
Hi
How can i execute simple select query in Redshift using Go (Redshift Data API)
Also, Can one help me resolving error while installing package - "go get github.com/aws/aws-lambda-go"
Error - go get: module github.com/aws/aws-lambda-go: Get "https://proxy.golang.org/github.com/aws/aws-lambda-go/@v/list": dial tcp: i/o timeout
fezekilePlaatyi
@fezekilePlaatyi
Hello, How to make a timestamp field on AWS Console for date on custom fields?
nallasai
@nallasai
Hi, Are there any code example of the RequestRetryer interface? I'm trying to use retries to fix 'Rate limiting' and throttling errors while making IAM API calls.
1 reply
Cristian Spinetta
@cspinetta
Hi everyone!
With my team we are building a reverse proxy to intercept all outgoing requests to S3 in order to audit and control the access from the different apps.
We've successfully implemented almost all operations by streaming the content of the files. For instance, to upload with single operation we used the s3manager.Uploader to stream the body of the incoming request (which is an io.Reader) to S3 and to download (both single and multipart flavor) we used the primitive io.Copy to write the response from the ´s3.GetObjectOutput.Body´ (which is an io.ReadCloser).
The only operation we still couldn't implement via streaming was the upload-part (in the context of a multipart uploading). The problem is that s3.UploadPartInput needs a aws.ReadSeekCloser and to pass the body of the incoming request you need to buffer it in some place (for example, in memory). Is there a way to stream an incoming request of an UploadPart with no need to store the entire body in memory?
Cristian Spinetta
@cspinetta

Hi everyone!
With my team we are building a reverse proxy to intercept all outgoing requests to S3 in order to audit and control the access from the different apps.
We've successfully implemented almost all operations by streaming the content of the files. For instance, to upload with single operation we used the s3manager.Uploader to stream the body of the incoming request (which is an io.Reader) to S3 and to download (both single and multipart flavor) we used the primitive io.Copy to write the response from the ´s3.GetObjectOutput.Body´ (which is an io.ReadCloser).
The only operation we still couldn't implement via streaming was the upload-part (in the context of a multipart uploading). The problem is that s3.UploadPartInput needs a aws.ReadSeekCloser and to pass the body of the incoming request you need to buffer it in some place (for example, in memory). Is there a way to stream an incoming request of an UploadPart with no need to store the entire body in memory?

just in case, here I asked this question: https://stackoverflow.com/q/67624774/3392786

SathiyaraJ
@sathiit_twitter
hi , how we can set the custom type attribute value in dynamodb.attributeValue? in golang
"ID": {
S: aws.String(<custom type here>),
},
avexbesuke
@avexbesuke
https://docs.aws.amazon.com/sdk-for-go/api/service/cloudfront/sign/#URLSigner.Sign
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
@SozzzZ_gitlab
InvalidClientTokenId: The security token included in the request is invalid.
how can i get the true tiken
Cristian Măgherușan-Stanciu
@cristim

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
@cristim
I ended up doing some regex replaces on those SKU values before unmarshaling, this is so fugly
Cristian Măgherușan-Stanciu
@cristim
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
@pragyanaryal
Hello Can anyone help me using Cognito Admin API using aws-sdk-go-v2
image.png
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
@yuvalif
Hi,
I'm looking for a way to set the signature version explicitly for a client. found documentation for various SDKs, but not for golang
https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingAWSSDK.html#specify-signature-version
JK
@jkgithubrepo

Hi,
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?

Thanks
JK

Yuval Lifshitz
@yuvalif
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