func (c *EC2Metadata) GetUserData() (string, error) {
	op := &request.Operation{
		Name:       "GetUserData",
		HTTPMethod: "GET",
		HTTPPath:   path.Join("/", "user-data"),
	}
	output := &metadataOutput{}
	req := c.NewRequest(op, nil, output)
	req.Handlers.UnmarshalError.PushBack(func(r *request.Request) {
		if r.HTTPResponse.StatusCode == http.StatusNotFound {
			r.Error = awserr.New("NotFoundError", "user-data not found", r.Error)
		}
	})
	return output.Content, req.Send()
}
GetUserData returns the userdata that was configured for the service. If
there is no user-data setup for the EC2 instance a "NotFoundError" error
code will be returned.
package ec2metadata
import (
	"encoding/json"
	"fmt"
	"net/http"
	"path"
	"strings"
	"time"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/request"
)
func (c *EC2Metadata) GetMetadata(p string) (string, error) {
	op := &request.Operation{
		Name:       "GetMetadata",
		HTTPMethod: "GET",
		HTTPPath:   path.Join("/", "meta-data", p),
	}
	output := &metadataOutput{}
	req := c.NewRequest(op, nil, output)
	return output.Content, req.Send()
}