how to set aws_access_key_id
awscfg := aws.NewConfig().WithRegion(config.Region).WithCredentials(credentials.NewSharedCredentials("", config.Profile)) svc = cloudwatch.New(session.New(awscfg)) c := aws.NewConfig().WithCredentials(credentials.NewStaticCredentials(aws_access_key_id , aws_secret_access_key , ""))
参考:
https://github.com/search?q=awscfg.WithCredentials&type=Code&utf8=%E2%9C%93
https://github.com/pr8kerl/cloudwatcher/blob/3ef8628b73530a15fb6fbed01ee11b2f2a7447eb/main.go
https://github.com/phrase/aws-mfa/blob/ef4920a056c001361964919c7869e90b4e1a11c7/vendor/github.com/phrase/awscfg/metadata.go