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
hemanjayam
@hemanjayam
"cannot use &iot.DynamoDBv2Action literal (type iot.DynamoDBv2Action) as type iot.Action in slice literal"
hemanjayam
@hemanjayam
@swoldemi It worked thanks, sorry I missed double {{
James Elgar
@JElgar
hi there, I'm having a real hard time wrapping my head around credentials for an aws educate account
Shakil Akhtar
@shakiakhtar_gitlab
is anyone implemented to get Authorization token in Go
decore
@waytai
svc.DescribeThing(descriptthinginput) ResourceNotFoundException: Not Found
what this mean?
my thingname is right, but returns {
"message": {
"Attributes": null,
"BillingGroupName": null,
"DefaultClientId": null,
"ThingArn": null,
"ThingId": null,
"ThingName": null,
"ThingTypeName": null,
"Version": null
}
}
can any body help me?
Simon Woldemichael
@swoldemi
@shakiakhtar_gitlab authorization token for ECR? https://docs.aws.amazon.com/sdk-for-go/api/service/ecr/#ECR.GetAuthorizationToken
Or for a different AWS service?
Simon Woldemichael
@swoldemi
@waytai Can you set aws.Config.LogLevel in your session and share the output? It's possible you're in the wrong region/have no authorization
    config := &aws.Config{
        LogLevel:   aws.LogLevel(aws.LogDebugWithRequestErrors),
        Region:     aws.String("us-east-1"),
        MaxRetries: aws.Int(5),
    }
    svc := iot.New(session.New(config))
decore
@waytai
I can get shadow getthingshadowinput := &iotdataplane.GetThingShadowInput{ThingName:&thingname}
out, _ := svc.GetThingShadow(getthingshadowinput)
var REGION = "cn-north-1"
decore
@waytai
@swoldemi

func GetAwsIotThing(thingname string) *iot.DescribeThingOutput {

var client = session.Must(session.NewSession(
    aws.NewConfig().
        WithRegion(config.REGION).
        WithEndpoint(config.ENDPOINT).
        WithLogLevel(3),
))


client.Config.Credentials = credentials.NewStaticCredentials(config.AK, config.SK, "")

svc := iot.New(client, &aws.Config{
    DisableParamValidation: aws.Bool(true),
})

descriptthinginput :=  &iot.DescribeThingInput{ThingName: aws.String(thingname)}
out, err := svc.DescribeThing(descriptthinginput)
fmt.Println(err.Error())
return out

}

Simon Woldemichael
@swoldemi
@waytai Are you sure your machine/static access key and secret access key are for Beijing? Can you use the AWS CLI to run aws sts get-caller-identity
Ah you mentioned you're able to view the device shadow
decore
@waytai
I have got device shadow , but tings information I can't get.
Simon Woldemichael
@swoldemi
I'm not really sure where to go from here without seeing some debug output. I don't have much experience with IoT Core and don't have access to an account in the China regions either :\
decore
@waytai
image.png
Simon Woldemichael
@swoldemi
can you call iot.ListThings?
decore
@waytai
image.png
iot.ListThings need NextToken, I do not know where this value come from
Simon Woldemichael
@swoldemi
You can leave it empty, that's just for pagination if you have many Things that get returned. Let's you pick up where you left on after the previous request
iot.cn-north-1.amazonaws.com.cn is the endpoint but your request makes a GET to thing-name.ats.iot.cn-north-1.amazonaws.com.cn
Do you know what ats is?
what's after /thing/? it's cut off in the screenshot @waytai
decore
@waytai
image.png
image.png
Simon Woldemichael
@swoldemi
Ah ats is Amazon Trust Service with some random prefix it looks like. I'm a little confused now https://docs.aws.amazon.com/general/latest/gr/greengrass.html
on WithEndpoint(config.ENDPOINT). what is the value of config.ENDPOINT?
also thank your for you kindly reply.=
Simon Woldemichael
@swoldemi
no problem, from https://docs.aws.amazon.com/general/latest/gr/iot-core.html it doesn't look like theres an ATS endpoint for IoT core. when you called ListThings, did you use that same endpoint?
decore
@waytai
yes,I have use the same endpoint
I konw, thank you
Simon Woldemichael
@swoldemi
what do you see when you run aws iot describe-endpoint --endpoint-type iot:Data
Simon Woldemichael
@swoldemi
what happens if you try to CreateThing then DescribeThing immediately after? Documentation says to use the thingName but worth a shot to attempt the thingId and thingArn, i'm really not sure @waytai
only other thing is authorization, but if you're allowed to ListThing I can't imagine the user behind your credentials is being restricted. getting a 404 instead of a 401 too...
decore
@waytai
root@liu:~# aws iot describe-endpoint --endpoint-type iot:Data
{
"endpointAddress": "athdo18zuldn6.iot.cn-north-1.amazonaws.com.cn"
}
Simon Woldemichael
@swoldemi
maybe aws iot describe-thing --thing-name testliu --region cn-north-1 --debug true --endpoint athdo18zuldn6.iot.cn-north-1.amazonaws.com.cn @waytai
decore
@waytai

root@liu:~# aws iot describe-thing --thing-name testliu --region cn-north-1 --endpoint https://athdo18zuldn6.ats.iot.cn-north-1.amazonaws.com.cn

An error occurred (ResourceNotFoundException) when calling the DescribeThing operation: Not Found

also not use ats

root@liu:~# aws iot describe-thing --thing-name testliu --region cn-north-1 --endpoint https://athdo18zuldn6.iot.cn-north-1.amazonaws.com.cn

An error occurred (ResourceNotFoundException) when calling the DescribeThing operation: Not Found

but use aws iot describe-thing --thing-name testliu can get the result
I have success,
should use "https://iot.cn-north-1.amazonaws.com.cn" this url but not the endpoint url
decore
@waytai
thank you for you great help
decore
@waytai
root@liu:~# aws iot describe-thing --thing-name testliu --region cn-north-1 --endpoint https://iot.cn-north-1.amazonaws.com.cn
success
Simon Woldemichael
@swoldemi
Nice! No problem