Sparta v0.9.0 Release Notes

    • 💥 :warning: BREAKING

      • NewMethod and NewAuthorizedMethod for APIGateway definitions have been changed to include new, final parameter that marks the default integration response code.
      • Prior to this change, Sparta would automatically use http.StatusOK for all non-POST requests, and http.StatusCreated for POST requests. The change allows you to control whitelisted headers to be returned through APIGateway as in:
      // API response struct
      type helloWorldResponse struct {
        Location string `json:"location"`
        Body     string `json:"body"`
      }
      //
      // Promote the location key value to an HTTP header
      //
      apiGWMethod, _ := apiGatewayResource.NewMethod("GET", http.StatusOK)
      apiGWMethod.Responses[http.StatusOK].Parameters = map[string]bool{
        "method.response.header.Location": true,
      }
      apiGWMethod.Integration.Responses[http.StatusOK].Parameters["method.response.header.Location"] = "integration.response.body.location"
      
    • :checkered_flag: CHANGES

      autoIncrementingInfo, autoIncrementingInfoErr := spartaCF.AddAutoIncrementingLambdaVersionResource(serviceName,
        lambdaResourceName,
        cfTemplate,
        logger)
      if nil != autoIncrementingInfoErr {
        return autoIncrementingInfoErr
      }
      
      • Added new CloudWatch Metrics for lambda execution
      • Removed all NodeJS shim dependencies from ./resources/provision/package.json
      • Added utility CloudFormation script ./aws/cloudformation/cli/describe.go which produces a JSON serialization of a DescribeStacksOutput struct for build-time discovery of cluster-scoped resources.
      • Relaxed constraint that an API GW resource is bound to single Sparta lambda function. You can now register per-HTTP method name lambda functions for the same API GW resource.
      • Added Contributors section to README
    • 🛠 :bug: FIXED