Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

SNS example

Ryan Bigg edited this page Aug 18, 2014 · 1 revision

SNS Example

SNS support is currently experimental. Use it at your own risk. If you find any bugs, please file an issue.

package main

import (
  "github.com/mitchellh/goamz/aws"
  "github.com/mitchellh/goamz/exp/sns"
  "log"
  "fmt"
)

func main() {
  auth, err := aws.GetAuth("", "")
  if err != nil {
    log.Fatal(err)
  }
  s := sns.New(auth, aws.USEast)
  token := ""
  
  resp, err := s.ListSubscriptions(&token)

  if err != nil {
    log.Fatal(err)
  }

  log.Print(fmt.Sprintf("%T %+v", resp.Subscriptions[0], resp.Subscriptions[0]))
}
Clone this wiki locally