Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: aws/aws-lambda-go
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.14.0
Choose a base ref
...
head repository: aws/aws-lambda-go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.14.1
Choose a head ref
  • 6 commits
  • 10 files changed
  • 3 contributors

Commits on Feb 14, 2020

  1. fix sample source syntax error (#260)

    Co-authored-by: Bryan Moffatt <bmoffatt@users.noreply.github.com>
    youmjww and bmoffatt authored Feb 14, 2020
    Copy the full SHA
    73c6c72 View commit details
  2. Remove misleading README_AppSync.md (#261)

    events.AppSyncResolverTemplate isn't useful for using AppSync with go1.x, AppSync customers should be using `json.RawMessage`, or otherwise defining structs for their post transformation input.
    bmoffatt authored Feb 14, 2020
    Copy the full SHA
    3329b05 View commit details

Commits on Mar 2, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    17040d2 View commit details
  2. Update build-lambda-zip to use urfave/cli/v2 (#266)

    Co-authored-by: Bryan Moffatt <bmoffatt@users.noreply.github.com>
    alex and bmoffatt authored Mar 2, 2020
    Copy the full SHA
    54dabe6 View commit details

Commits on Mar 3, 2020

  1. Update build-lambda-zip workflow (#267)

    Update build-lambda-zip workflow
    
    * run on push to master
    * explicit go get @master
    bmoffatt authored Mar 3, 2020
    Copy the full SHA
    861cd6d View commit details
  2. Copy the full SHA
    4a86f66 View commit details
4 changes: 3 additions & 1 deletion .github/workflows/build-lambda-zip.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: go get build-lambda-zip
on:
push:
branches:
- master
schedule:
- cron: "7 7 * * *"

@@ -24,4 +26,4 @@ jobs:
GO111MODULE: on
run: |
go env
go get -u github.com/aws/aws-lambda-go/cmd/build-lambda-zip
go get -u github.com/aws/aws-lambda-go/cmd/build-lambda-zip@master
2 changes: 0 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@ name: tests
on:
push:
pull_request:
schedule:
- cron: "7 7 * * *"

jobs:

48 changes: 24 additions & 24 deletions cmd/build-lambda-zip/main.go
Original file line number Diff line number Diff line change
@@ -8,36 +8,36 @@ import (
"os"
"path/filepath"

"github.com/urfave/cli"
"github.com/urfave/cli/v2"
)

func main() {
app := cli.NewApp()
app.Name = "build-lambda-zip"
app.Usage = "Put an executable and supplemental files into a zip file that works with AWS Lambda."
app.Flags = []cli.Flag{
&cli.StringFlag{
Name: "output, o",
Value: "",
Usage: "output file path for the zip. Defaults to the first input file name.",
app := &cli.App{
Name: "build-lambda-zip",
Usage: "Put an executable and supplemental files into a zip file that works with AWS Lambda.",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "output, o",
Value: "",
Usage: "output file path for the zip. Defaults to the first input file name.",
},
},
}

app.Action = func(c *cli.Context) error {
if !c.Args().Present() {
return errors.New("no input provided")
}
Action: func(c *cli.Context) error {
if !c.Args().Present() {
return errors.New("no input provided")
}

inputExe := c.Args().First()
outputZip := c.String("output")
if outputZip == "" {
outputZip = fmt.Sprintf("%s.zip", filepath.Base(inputExe))
}
inputExe := c.Args().First()
outputZip := c.String("output")
if outputZip == "" {
outputZip = fmt.Sprintf("%s.zip", filepath.Base(inputExe))
}

if err := compressExeAndArgs(outputZip, inputExe, c.Args().Tail()); err != nil {
return fmt.Errorf("failed to compress file: %v", err)
}
return nil
if err := compressExeAndArgs(outputZip, inputExe, c.Args().Tail()); err != nil {
return fmt.Errorf("failed to compress file: %v", err)
}
return nil
},
}

if err := app.Run(os.Args); err != nil {
2 changes: 1 addition & 1 deletion events/README_ALBTargetGroupEvents.md
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ func handleRequest(ctx context.Context, request events.ALBTargetGroupRequest) (e
fmt.Printf(" %s: %s\n", key, value)
}

return events.ALBTargetGroupResponse{Body: request.Body, StatusCode: 200, StatusDescription: "200 OK", IsBase64Encoded: false, Headers: map[string]string{}}}, nil
return events.ALBTargetGroupResponse{Body: request.Body, StatusCode: 200, StatusDescription: "200 OK", IsBase64Encoded: false, Headers: map[string]string{}}, nil
}

func main() {
30 changes: 0 additions & 30 deletions events/README_AppSync.md

This file was deleted.

2 changes: 1 addition & 1 deletion events/firehose.go
Original file line number Diff line number Diff line change
@@ -39,6 +39,6 @@ type KinesisFirehoseRecordMetadata struct {
ShardID string `json:"shardId"`
PartitionKey string `json:"partitionKey"`
SequenceNumber string `json:"sequenceNumber"`
SubsequenceNumber string `json:"subsequenceNumber"`
SubsequenceNumber int64 `json:"subsequenceNumber"`
ApproximateArrivalTimestamp MilliSecondsEpochTime `json:"approximateArrivalTimestamp"`
}
4 changes: 2 additions & 2 deletions events/testdata/kinesis-firehose-event.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
"partitionKey": "4d1ad2b9-24f8-4b9d-a088-76e9947c317a",
"approximateArrivalTimestamp": 1507217624302,
"sequenceNumber": "49546986683135544286507457936321625675700192471156785154",
"subsequenceNumber": "123456"
"subsequenceNumber": 123456
}
},
{
@@ -25,7 +25,7 @@
"partitionKey": "4d1ad2b9-24f8-4b9d-a088-76e9947c318a",
"approximateArrivalTimestamp": 1507217624302,
"sequenceNumber": "49546986683135544286507457936321625675700192471156785155",
"subsequenceNumber": "123457"
"subsequenceNumber": 123457
}
}
]
2 changes: 1 addition & 1 deletion events/testdata/kinesis-firehose-response.json
Original file line number Diff line number Diff line change
@@ -11,4 +11,4 @@
"result": "TRANSFORMED_STATE_DROPPED"
}
]
}
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -4,5 +4,5 @@ go 1.12

require (
github.com/stretchr/testify v1.4.0
github.com/urfave/cli v1.22.1
github.com/urfave/cli/v2 v2.1.1
)
5 changes: 3 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -12,8 +12,9 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k=
github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=