goamz

unsupported protocol scheme while creating ec2 Security group

那年仲夏 提交于 2019-12-12 02:26:05
问题 I am trying to create security group using goamz. Below is my code. package main import ( "fmt" "os" "github.com/mitchellh/goamz/aws" "github.com/mitchellh/goamz/ec2" ) type SecurityGroup struct { Id string `xml:"groupId"` Name string `xml:"groupName"` Description string `xml:"groupDescription"` VpcId string `xml:"vpcId"` } func main() { auth := aws.Auth{ AccessKey: os.Getenv("key"), SecretKey: os.Getenv("secret"), } region := aws.Region{ Name : "us-east-1", } ec2conn := ec2.New(auth, region)