-
Notifications
You must be signed in to change notification settings - Fork 34
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
Update index.ts #31
Update index.ts #31
Conversation
set `assetHashType: AssetHashType.SOURCE`, see aws/aws-cdk#12984
@@ -87,6 +87,7 @@ export class ECRDeployment extends CoreConstruct { | |||
const handler = new lambda.SingletonFunction(this, 'CustomResourceHandler', { | |||
uuid: this.renderSingletonUuid(props.memoryLimit), | |||
code: lambda.Code.fromAsset(path.join(__dirname, '../lambda'), { | |||
assetHashType: AssetHashType.SOURCE, // see https://github.com/aws/aws-cdk/pull/12984 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TRANTANKHOA What will happen if I don't set this? I don't really get it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find cdk keeps rebuilding the lambda image on repeated builds, which is similar to the issue mentioned. I think change the hashType should fix that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, I've tried your stack and the go lambda failed for me with error fork/exec /var/task/main: permission denied: PathError null
. Do you have a hint why that is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll merge this PR firstly. And Please verify if this can solve your problem. @TRANTANKHOA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TRANTANKHOA Can you give me a sample repo of how you write your stack? And which region did u deploy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's fine. Thanks @wchaws ! I'll work it out
set
assetHashType: AssetHashType.SOURCE
, see aws/aws-cdk#12984