Git Product home page Git Product logo

lambda-warmer's People

Contributors

aaliakseyenka avatar c1moore avatar cdshepherd avatar dependabot[bot] avatar jeremydaly avatar jmhummel avatar larte avatar mbergal avatar mervintankw avatar mickvanduijn avatar naorpeled avatar stonepaw avatar superandrew213 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lambda-warmer's Issues

Lambda gets invoked multiple times

Hi
We have multiple lambdas and we are using terraform to deploy it so the input as an event that I am providing is
{"warmer": true, "functions": ["lambda_b", "lambda_c",...]}
When I am using a lambda (say Lambda_A) function so as to warm other lambdas at a rate of 15 minutes from the scheduler, I can see that the lambda is being invoked every 10 seconds.
I believe the library is already invoking itself (using aws-sdk) and also the other lambdas.

Lambda_A code:
`
if (await warmer(event)) {

  logger.info('Warmed lambda warmer itself!');

  if (!event.functions) return 'No functions to warm up!';

  let lambda = new AWS.Lambda();

  let warmers = event.functions.map(functionName => {

    let params = {

      FunctionName: functionName ,

      InvocationType: 'Event',

      LogType: 'Tail',

      Payload: Buffer.from(JSON.stringify(event))

    }

    return lambda.invoke(params).promise();
  });

  try { await Promise.all(warmers)} catch (e) {

    logger.info('Error while warming some lambdas');

    logger.error(e);

  }

  logger.info('Warmed all lambdas');

  return 'Warming done!';

}

return 'Nothing more to do here!';`

Lambda_B code:
if (await warmer(event, { log: false })) { logger.info('Warmed!!'); return 'Warmed'; } // Rest of the implementation
Cloudwatch logs

aws-sdk: 2.414.0

Unclear meaning of delay parameter

Hi there,

Great library. I am dealing with a lambda whose cold starts are large, and as a stop-gap I am using this library. I set it up with a concurrency of 4, with no other changes. EventBridge polls the lambda every 5 minutes with the correct payload. However, I am only seeing 2 concurrent executions of the lambda (locally, so there are no other invocations besides what EventBridge triggers). I am confused as to how it is only 2, and not 4.

Following that, I am pretty sure I am misunderstanding the meaning of the delay parameter, which I do not change. This is a really slow lambda, its cold start is around 11 seconds or so, even before reaching the short-circuit code, so logically it must invoke four times, but this is never reported as such by the concurrentExecutions metric from Cloud watch. Any ideas?

lastAccessed field in log may be incorrect

Expected behavior

The lastAccessed field in the log is the timestamp of when the function was last accessed by a non-warming event.

Actual behavior

The lastAccessed field in the log may be the timestamp of when the function was last accessed by a warming event; it's updated when processing warming events:

lastAccess = Date.now()

Details

As the documentation states, the lastAccessed field, along with lastAccessedSeconds, can help determine if the concurrency can be lowered. However, if lastAccessed is updated when processing warming events, then it cannot be used for that purpose.

This behavior was introduced in #6.

new Buffer is deprecated in nodejs 10.x

when running on runtime 10.x deprecation error is logged:
ERROR (node:7) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
can you please update new Buffer => Buffer.from

Could not resolve "@aws-sdk/client-lambda"

looks like "@aws-sdk/client-lambda" is a devDependency and needs to be a dependency.

Bundling asset platform-portal-stack/signOutWs/Code/Stage...
Error: R] Could not resolve "@aws-sdk/client-lambda"

node_modules/lambda-warmer/lib/lambda-service.js:9:48:
  9 │ ...{ LambdaClient, InvokeCommand } = require('@aws-sdk/client-lambda')
    ╵                                              ~~~~~~~~~~~~~~~~~~~~~~~~

You can mark the path "@aws-sdk/client-lambda" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.

1 error
node:child_process:924
throw err;
^

Alias support: lambda-warmer ignores alias when invoked with a tag and concurrency > 1

Setup:

  • Eventbridge calling lambda alias
  • Lambda calling itself another two time because of concurreny: 3 setting.

When a lambda with alias is invoked by event bridge with concurrency: 3, it will invoke the alias once. The alias will try to invoke itself another two times. However, the alias that is provided is ignored by the warmer function and therefore the latest tag is called.

I checked whether the target provided to the warmer function contains the alias, which it does. It seems the code does not use this part.

Code snippet:

console.log("I'm invoked",  context.invokedFunctionArn); // <-- contains the first call the function + ":ALIAS" tag.
    if (await warmer(event, { correlationId: context.awsRequestId, target: context.invokedFunctionArn })) {
        return 'warmed'
    }

Update:

after going through the code I notice two things:

  1. The code does not count on aliases being used (because it expects the target to match the function name, adding an alias or version number, being the same as the one executed, will be seen as a 'different' function).
  2. For an alias the Qualifier key must be sent with the InvokeCommand.

Build Issues with 1.2.2 version

See the below error with latest version 1.2.2:
node_modules/lambda-warmer/index.d.ts(23,1): error TS1036: Statements are not allowed in ambient contexts

Issues using from a lambda in VPC

Hi,

I started playing with the module and it worked great for lambda not associated to a VPC, but I couldn't make it work with lambda inside a VPC: the invocation timed out. I've read somewhere that it could be because I need to configure internet access for this case. Is this correct?

Thanks in advance, and thanks for the module.

Support for aliases is missing

The current version (2.0.1) does not support alias names for lambda invocations. I support the "$LATEST" tag and version numbers, but not any other alias e.g. stable. Therefore, if a lambda is called with the stable tag the code thinks a different lambda version must be called as isDifferentTarget is set to true (because the lambda version number is used for comparison instead of the tag). Therefore, it tries to call the lambda again instead of triggering a delay.

TypeError: lambda.invoke(...).promise is not a function

Hello,

I followed the tutorial and added the code (via the callback technique) to my existing lambda function.

I created a test event on the lambda with the following event object:
{ "warmer":true,"concurrency":3 }

When i executed the test, it failed with the following error traced on Cloudwatch:

TypeError: lambda.invoke(...).promise is not a function
at module.exports (/var/task/node_modules/lambda-warmer/index.js:94:48)

When i changed the concurrecy value to 1, it worked fine and returned "warmer" as the callback message (based on the default tutorial example). And i am assuming this is because we just return a Promise.resolve(true) when the concurrency is 1.

I read about this error in other posts and some people mentioned setting the API version for the SDK. But looking at nobody else had this issue, I am wondering I might have made a very obvious blunder and would appreciate some guidance regarding this.

Thanks!

Lambda-Warmer for AWS-SDK V3 needed

Dear Maintainers, Dear Supporters,

we are currently using the Lambda-Warmer and are now migrating towards node18 -> near support end of node14 + 16. Your code currently is using the AWS SDK V2 in the index.js thru line 78 let lambda = require('./lib/lambda-service') and this one is requiring the Lambda client const Lambda = require('aws-sdk/clients/lambda'). This is in fact a runtime dependency and AWS is mandating AWS-SDK V3 for lambdas running under node18. So the current lambda-warmer is no longer working in a node18-Lambda.

Do you have plans when to release a version of the Lambda-Warmer compatible with AWS SDK V3 ?

Thank you very much in advance for your reply
and best regards,

Michael

Warmer event randomly not detected in lambda

One of our lambdas randomly doesn't detect the event as a warmer event and proceed further which breaks our code (it happens 2-5 times a day).

Our code looks like below:

module.exports.execute = async (event, context, callback) => {
  // Warming up the lambda.
  if (await warmer(event)) {
    console.log('Warming up the lambda');
    return;
  }

  // Other code
}

We use serverless to schedule the warmer.

- schedule:
    name: ${self:service}-${self:provider.region}-${self:provider.stage}-warmer-lambda
    rate: rate(5 minutes)
    enabled: ${self:custom.warmup.enabled.${self:custom.config.environment}}
    input:
      warmer: true
      concurrency: 3

Using atleast v3.5.0 of thelambda-warmer.
node version 8.10.0

Should `invokeCount` not be `invokeTotal`?

If you look at line 106 where is being checked whether a delay must be triggered within the lambda, the code looks at invokeCount, which increases for every invoke. I think this should be invokeCount >= invokeTotal, as otherwise only the first lambda that is called will be delayed, while all up following lambda triggers will have no delay (e.g. invokeTotal = 5, than invokeCount > 1 is true 4 times). In case invokeCount equals invokeTotal no delay is necessary.

Currently, this results into less lambda invokes that are warmed.

Minor documentation issue

Hi Jeremy,

Great little tool here for warming, thanks for it!

One possible add to the documentation, maybe in the same place where you make a NOTE of the invoke privs required. If running the warmer in a VPC, the fan-out process (applicable when concurrency > 1) requires the usual NAT Gateway access. If a NAT Gateway is already properly configured then most users will I think not notice that this is how fan-out works, until one of their teammates takes out their NAT Gateway without telling them :)

Thanks again for a great tool,
Tony Sellitti

Concurrency > 1, don´t work in lambda function in VPC

When the concurrency parameter is greater than one, if the lambda function is not in a VPC, everything works normally, but if it is in a VPC the promise is never resolved. If I put concurrency equal to one, it works normally in VPC.
Please, is there any way to resolve this?

Lambda timeout for concurrency bigger than 1

Whenever I activate concurrency greater than 1, my Lambda times out.

My Lambda code looks like this:

exports.handler = async function (event, context) {
    if (await warmer(event, { correlationId: context.awsRequestId, delay: 50 })) {
        return {
            "statusCode": 200,
            "body": JSON.stringify({
                status: 200,
                title: "Warmed"
            })
        };
    }
    else {
        // do other stuff
    }
}

I have a Rule with a rate of 5mins, targeting my Lambda with the constant input:

{
  "warmer": true,
  "concurrency": 5
}

and the Lambda times out. if I change the concurrency to 1, it runs normally.

I've granted Lambda the right to invoke itself.

I'm using NodeJS V16, and these versions:

  • aws-sdk: 2.1167.0
  • lambda-warmer: 1.3.2

Find optimal concurrency level

Hi, we have a huge application that without qarming gets to 16 concurrency We have set the concurrency level of warmup to 20, but now rhe concurrency level gets to 24

Our application does some very intensive processin which can take up to 27 seconds, which makes us think that may be beating lambda-warmer because of lambda-warmer keeping busy the concurrent lambdas when this happens or something similar

Does this make sense? What procedure would you recommend to find the optimal lambda-warmer concurrency level?

Target is logged incorrectly?

Hi,

Just started to try and use this, and I think this log message is not correct. I assume it should reference the target if overridden, else fallback to the current function?

function: `${funcName}:${funcVersion}`,

Circular dependency issue with Rollup

Hello. Due to this commit, I'm now seeing these errors when building with Rollup:

$ rollup -ci lambdas/graphql-resolvers/src/resolvers/barrel/index.js -o lambdas/graphql-resolvers/dist/barrel/index.js

lambdas/graphql-resolvers/src/resolvers/barrel/index.js → lambdas/graphql-resolvers/dist/barrel/index.js...
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/json.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/json.js -> node_modules/aws-sdk/lib/json/builder.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/json.js -> node_modules/aws-sdk/lib/json/builder.js -> /Users/cade/Projects/sam/node_modules/aws-sdk/lib/util.js?commonjs-proxy -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/json.js -> node_modules/aws-sdk/lib/json/parser.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/json.js -> node_modules/aws-sdk/lib/protocol/helpers.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/json.js -> node_modules/aws-sdk/lib/protocol/helpers.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/json.js -> node_modules/aws-sdk/lib/protocol/helpers.js -> /Users/cade/Projects/sam/node_modules/aws-sdk/lib/core.js?commonjs-proxy -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/query.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/query.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/query.js -> node_modules/aws-sdk/lib/query/query_param_serializer.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/query.js -> node_modules/aws-sdk/lib/model/shape.js -> node_modules/aws-sdk/lib/model/collection.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/query.js -> node_modules/aws-sdk/lib/model/shape.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/rest.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/rest_json.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/rest_xml.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/protocol/rest_xml.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/xml/builder.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/model/api.js -> node_modules/aws-sdk/lib/model/operation.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/model/api.js -> node_modules/aws-sdk/lib/model/paginator.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/model/api.js -> node_modules/aws-sdk/lib/model/resource_waiter.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/model/api.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/sequential_executor.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/service.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/service.js -> node_modules/aws-sdk/lib/region_config.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/config.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/config.js -> node_modules/aws-sdk/lib/credentials.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/config.js -> node_modules/aws-sdk/lib/credentials/credential_provider_chain.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/http.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/event_listeners.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/event_listeners.js -> node_modules/aws-sdk/lib/discover_endpoint.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/util.js -> node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/event_listeners.js -> node_modules/aws-sdk/lib/discover_endpoint.js -> node_modules/aws-sdk/lib/util.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/request.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/response.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/resource_waiter.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/signers/request_signer.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/signers/request_signer.js -> node_modules/aws-sdk/lib/signers/v2.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/signers/request_signer.js -> node_modules/aws-sdk/lib/signers/v3.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/signers/request_signer.js -> node_modules/aws-sdk/lib/signers/v3https.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/signers/request_signer.js -> node_modules/aws-sdk/lib/signers/v4.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/signers/request_signer.js -> node_modules/aws-sdk/lib/signers/v4.js -> node_modules/aws-sdk/lib/signers/v4_credentials.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/signers/request_signer.js -> node_modules/aws-sdk/lib/signers/s3.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/signers/request_signer.js -> node_modules/aws-sdk/lib/signers/presign.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/core.js -> node_modules/aws-sdk/lib/param_validator.js -> node_modules/aws-sdk/lib/core.js
(!) Circular dependency: node_modules/aws-sdk/lib/node_loader.js -> node_modules/aws-sdk/lib/credentials/temporary_credentials.js -> node_modules/aws-sdk/clients/sts.js -> node_modules/aws-sdk/lib/node_loader.js
(!) Circular dependency: node_modules/aws-sdk/lib/node_loader.js -> node_modules/aws-sdk/lib/credentials/temporary_credentials.js -> node_modules/aws-sdk/clients/sts.js -> /Users/cade/Projects/sam/node_modules/aws-sdk/lib/node_loader.js?commonjs-proxy -> node_modules/aws-sdk/lib/node_loader.js
(!) Circular dependency: node_modules/aws-sdk/lib/node_loader.js -> node_modules/aws-sdk/lib/credentials/cognito_identity_credentials.js -> node_modules/aws-sdk/clients/cognitoidentity.js -> node_modules/aws-sdk/lib/node_loader.js
(!) Circular dependency: node_modules/xmlbuilder/lib/XMLNode.js -> node_modules/xmlbuilder/lib/XMLElement.js -> node_modules/xmlbuilder/lib/XMLNode.js
(!) Circular dependency: node_modules/xmlbuilder/lib/XMLNode.js -> node_modules/xmlbuilder/lib/XMLElement.js -> /Users/cade/Projects/sam/node_modules/xmlbuilder/lib/XMLNode.js?commonjs-proxy -> node_modules/xmlbuilder/lib/XMLNode.js
(!) Circular dependency: node_modules/xmlbuilder/lib/XMLNode.js -> node_modules/xmlbuilder/lib/XMLCData.js -> node_modules/xmlbuilder/lib/XMLNode.js
(!) Circular dependency: node_modules/xmlbuilder/lib/XMLNode.js -> node_modules/xmlbuilder/lib/XMLComment.js -> node_modules/xmlbuilder/lib/XMLNode.js
(!) Circular dependency: node_modules/xmlbuilder/lib/XMLNode.js -> node_modules/xmlbuilder/lib/XMLDeclaration.js -> node_modules/xmlbuilder/lib/XMLNode.js
(!) Circular dependency: node_modules/xmlbuilder/lib/XMLNode.js -> node_modules/xmlbuilder/lib/XMLDocType.js -> node_modules/xmlbuilder/lib/XMLNode.js
(!) Circular dependency: node_modules/xmlbuilder/lib/XMLNode.js -> node_modules/xmlbuilder/lib/XMLDocType.js -> node_modules/xmlbuilder/lib/XMLDTDAttList.js -> node_modules/xmlbuilder/lib/XMLNode.js
(!) Circular dependency: node_modules/xmlbuilder/lib/XMLNode.js -> node_modules/xmlbuilder/lib/XMLDocType.js -> node_modules/xmlbuilder/lib/XMLDTDEntity.js -> node_modules/xmlbuilder/lib/XMLNode.js
(!) Circular dependency: node_modules/xmlbuilder/lib/XMLNode.js -> node_modules/xmlbuilder/lib/XMLDocType.js -> node_modules/xmlbuilder/lib/XMLDTDElement.js -> node_modules/xmlbuilder/lib/XMLNode.js
(!) Circular dependency: node_modules/xmlbuilder/lib/XMLNode.js -> node_modules/xmlbuilder/lib/XMLDocType.js -> node_modules/xmlbuilder/lib/XMLDTDNotation.js -> node_modules/xmlbuilder/lib/XMLNode.js
(!) Circular dependency: node_modules/xmlbuilder/lib/XMLNode.js -> node_modules/xmlbuilder/lib/XMLRaw.js -> node_modules/xmlbuilder/lib/XMLNode.js
(!) Circular dependency: node_modules/xmlbuilder/lib/XMLNode.js -> node_modules/xmlbuilder/lib/XMLText.js -> node_modules/xmlbuilder/lib/XMLNode.js
(!) Circular dependency: node_modules/xmlbuilder/lib/XMLNode.js -> node_modules/xmlbuilder/lib/XMLProcessingInstruction.js -> node_modules/xmlbuilder/lib/XMLNode.js
created lambdas/graphql-resolvers/dist/barrel/index.js in 5.6s

When I revert that commit, everything works as expected:

$ rollup -ci lambdas/graphql-resolvers/src/resolvers/barrel/index.js -o lambdas/graphql-resolvers/dist/barrel/index.js

lambdas/graphql-resolvers/src/resolvers/barrel/index.js → lambdas/graphql-resolvers/dist/barrel/index.js...
created lambdas/graphql-resolvers/dist/barrel/index.js in 2.8s

Let me know if more detail is needed, but this is preventing me from upgrading.

Thanks!

lambda-warmer ignores value of AWS_LAMBDA_FUNCTION_VERSION

Hi!
After upgrade to version 2.0.0 (because of AWS SDK v3 support) it was necessary to change our IAM policy because lambda-warmer is ignoring the value of AWS_LAMBDA_FUNCTION_VERSION. The value will still be used to create the log-record but it will be ignored afterwards:

...
const funcName = process.env.AWS_LAMBDA_FUNCTION_NAME
const funcVersion = process.env.AWS_LAMBDA_FUNCTION_VERSION
...
// Create log record
let log = {
action: 'warmer',
function: funcName + ':' + funcVersion,
...
I think the functionality is changed since version 1.3.0 – support multiple targets. Is this the expected behavior?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.