I'm using the serverless framwework to build a simple function with aws-go. My function works but whenever I try to make a GET request I get an internal server error
My function is a copy paste from the aws-sdk
documentation
input := &rds.ModifyDBClusterSnapshotAttributeInput{
AttributeName: aws.String("restore"),
DBClusterSnapshotIdentifier: aws.String("foobar"),
ValuesToAdd: []*string{
aws.String("123456789"),
},
ValuesToRemove: []*string{
aws.String("all"),
},
}
result, err := svc.ModifyDBClusterSnapshotAttribute(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case rds.ErrCodeDBClusterSnapshotNotFoundFault:
fmt.Println(rds.ErrCodeDBClusterSnapshotNotFoundFault, aerr.Error())
case rds.ErrCodeInvalidDBClusterSnapshotStateFault:
fmt.Println(rds.ErrCodeInvalidDBClusterSnapshotStateFault, aerr.Error())
case rds.ErrCodeSharedSnapshotQuotaExceededFault:
fmt.Println(rds.ErrCodeSharedSnapshotQuotaExceededFault, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)