awslabs / aws-lambda-go-api-proxy

lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin (https://gin-gonic.github.io/gin/ ) to AWS Lambda and Amazon API Gateway.
Apache License 2.0
1.04k stars 197 forks source link

Infer domain name from request context #67

Closed RaeesBhatti closed 4 years ago

RaeesBhatti commented 4 years ago

Issue #, if available: Fixes: https://github.com/awslabs/aws-lambda-go-api-proxy/issues/46 Fixes: https://github.com/awslabs/aws-lambda-go-api-proxy/issues/13 Description of changes: aws-lambda-go recently added support for DomainName property in RequestContext. We want to revert to that domain name rather than aws-serverless-go-api.com. This change is backwards compatible, in that, people using GO_API_HOST env variable can still use that.

I wasn't able to update dependencies properly with govendor because it keeps thowing an error when I try to do govendor get github.com/aws/aws-lambda-go@v1.17.0:

go: finding module for package github.com/aws/aws-lambda-go
can't load package: package github.com/aws/aws-lambda-go: module github.com/aws/aws-lambda-go@latest found (v1.17.0), but does not contain package github.com/aws/aws-lambda-go
Error: exit status 1

Please update dependencies manually and publish them here when reviewing this PR!

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

RaeesBhatti commented 4 years ago

@sapessi Is this a dead project? Should the community look for other solutions? Because I don't see any kind of review of feedback!

sapessi commented 4 years ago

Apologies @RaeesBhatti, I hadn't looked at this because I saw that the checks failed. Let me take a quick look

RaeesBhatti commented 4 years ago

Thank you! The tests are failing because of dependency issues. I couldn't update to github.com/aws/aws-lambda-go@v1.17.0 because govendor kept failing on me for some reason. Please update that dependency and push to this branch and the tests should pass.

RaeesBhatti commented 4 years ago

@sapessi I updated github.com/aws/aws-lambda-go/events. Can you please take a look again!

sapessi commented 4 years ago

Looks like the build is still failing. I suspect this is because the go.mod file is not updated to point to the latest version of the dependency, I only see a change in the sum file.

RaeesBhatti commented 4 years ago

@sapessi I've updated the mod file and test. They're passing now. Can you take another look please!