-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lambda-go-alpha: CDK Stages don't work properly on their own #26358
Comments
Looks like the I would rather use import { GoFunction } from '@aws-cdk/aws-lambda-go-alpha';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as path from 'path';
export class TestStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
new GoFunction(this, 'testFunction', {
entry: path.join(__dirname, '../../functions/test'),
functionName: 'testFunction',
});
}
} |
I gave that a try but nothing has changed |
Any updates or suggestions? |
@pahud what'd you think? |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
I am not sure if this is related to the Windows 11 environment but it always works for me when I open your repo with GitPod. Are you able to test that in any other environment and see if it still fails? |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
I'll try and see whether deploying into a different environment soon then |
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
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)
The text was updated successfully, but these errors were encountered: