Closed remotejob closed 8 months ago
Based on the format of the secret strings you’re using, it seems you are employing the wrong type of secret. It appears that you are using Static access keys compatible with the AWS API, but the example expects an IAM token. Additionally, you are misusing flag.String
. This function defines a flag to be parsed from the application call in the terminal; you should not directly insert values into the flag.String
arguments.
Thank!
ref: examples/lockboxpayload
yc iam access-key create --service-account-name lockbox --description "for view password etc."
iamToken := flag.String("iam-token", "YCAJEqBE3S6DqXXXXXXX", "YCONuZpADnC3Ue8ZAC_kdJKk9-UdTXXXXXXX") secretID := flag.String("secret-id","e6qh4c0770di1i2emljc", "e6qpndjijfq1ivu41q3t") sdk, err := ycsdk.Build(context.Background(), ycsdk.Config{ Credentials: ycsdk.NewIAMTokenCredentials(*iamToken), }) if err != nil { log.Println("1") log.Fatal(err) }