lambda-go-alpha: CDK Stages don't work properly on their own
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the bug
I've been using the TypeScript CDK with AWS CodePipelines and Golang lambda functions for a short while
Recently I tried to create some quick tests, and so tried to deploy a simple cutdown CDK Stage instead of a full pipeline deployment
However, there seems to be a bug where the CDK won't deploy any lambda function binaries during the first deployment (instead it just uploads the source code, which obviously can't work)
### Expected Behavior
Deploy the binary
### Current Behavior
Instead of the binary getting deployed, most of the time the source code folder just gets deployed
### Reproduction Steps
I've created a simple minimal example to illustrate the problem more clearly:
https://github.com/KamWithK/golang_stage_aws_test
### Possible Solution
No idea why this happens, or whether something I'm doing is causing it, but it seems quite sporadic
Very very rarely it won't happen and the binary will be deployed correctly
Normally if the source code gets deployed instead of the binary, rerunning the synth command and then deploying will cause the binary to replace the source code
This stuff seems to happen somewhat randomly though so I'm not sure why
### Additional Information/Context
I'm trying to use a stage by itself purely because local testing frameworks don't support AWS features like pipelines, the problem occurs on AWS itself though
### CDK CLI Version
2.87.0 (build 9fca790)
### Framework Version
_No response_
### Node.js Version
18.16.1
### OS
Windows 11
### Language
Typescript
### Language Version
_No response_
### Other information
I was debating whether to create an issue here or on the [AWS lambda go repository](https://github.com/aws/aws-lambda-go)
I've posted here for now because I don't know how to verify whether the problem is with their library or the CDK doing something funky which could maybe be more than just the lambda (just a worry, not sure how to test/verify that)
Contributor guide
Research direction
Start with the minimal example at https://github.com/KamWithK/golang_stage_aws_test and reproduce the first deployment of the standalone CDK Stage using the reported CDK CLI and Node.js versions. Compare the deployed Lambda artifact with the result after rerunning synth; done means the binary is deployed on the initial deployment rather than the source folder.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100