question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Don't wait for Lambda deployment

See original GitHub issue

When deploying a Lambda through CodeDeploy configure with, for example, LINEAR_10PERCENT_EVERY_10MINUTES, CDK will block waiting for the deployment to finish (and display the message “CodeDeploy deployment started”.

CDK should just start the deployment and not wait for it to finish, since failing a Lambda deployment (and rolling it back) should have no bearing on the rest of the CDK deployment.

Reproduction Steps

const lambdaName = basename(__dirname)

export async function myLambda(stack: Stack): Promise<Alias> {
    const f = new Function(stack, lambdaName, {
        runtime: Runtime.GO_1_X,
        handler: "main",
        code: Code.asset(join(__dirname, "lambda.zip")),
    })

    const alias = new Alias(stack, lambdaName + "-alias", {
        aliasName: "live",
        version: f.addVersion(2),
    })

    new LambdaDeploymentGroup(stack, lambdaName + "-deployment", {
        alias: alias,
        deploymentConfig: LambdaDeploymentConfig.LINEAR_10PERCENT_EVERY_10MINUTES,
    })

    return alias
}

Error Log

CDK blocks in the UPDATE_IN_PROGRESS stage.

Environment

  • **CLI Version : 1.18.0
  • **Framework Version: 1.18.0
  • **OS : macOS Catalina
  • **Language : Typescript

Other


This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
duartencommented, Dec 8, 2019

The advantage would be to only have to deal with CDK and no other tool. Ideally, I could specify which stacks to wait for and which to fire-and-forget (and I wouldn’t mind contributing this code). Even more ideally, CDK could have hooks that would allow me to specify this programmatically, so that I could for example wait for a deployment only until CodeDeploy is done with the pre-traffic tests.

1reaction
KyleMuellerPFGcommented, Apr 27, 2021

I’d be interested in this "fire-and-forget’ avenue to support deployments of apps that contain stacks provisioning AWS Certificates, as certificates aren’t “complete” until validated, a process that could potentially take a lot of time if it involves e-mail validation, and I don’t want to hang up the rest of the deployment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Best practices for working with AWS Lambda functions
To have full control of the dependencies your function uses, package all of your dependencies with your deployment package. Minimize your deployment package ......
Read more >
How to manage canary deployments on Lambda via the ...
Basically, our Lambda function deployments will be on autopilot. ... body: 'Wait, it is Serverless v1.26.11!' }; callback(null, response);.
Read more >
AWS Lambda request and wait for response in asynchronous ...
I have a simple problem. I want to create some kind of pipeline. First we have a function that does a request to...
Read more >
Automate AWS lambda function deployments with AWS CDK
Our tutorials are platform-agnostic, but use CircleCI as an example. If you don't have a CircleCI account, sign up for a free one...
Read more >
AWS Lambda Timeout Best Practices - Lumigo
Take charge of AWS Lambda timeouts and learn how to prevent timeout errors and service ... Setting the short timeout will ensure that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found