GithubHelp home page GithubHelp logo

Comments (10)

tibbe avatar tibbe commented on July 2, 2024

Assuming I'm looking at the right code, it's not obvious why this happens:

dynamodbStreamStatement.Resource.push(EventSourceArn);

The above code seems to add each resource to the same statement (although without any deduping based on the resource, from what I can see). I don't see how we end up getting multiple statements.

from serverless.

tibbe avatar tibbe commented on July 2, 2024

Could it be that CloudFormation (perhaps when doing an incremental deployment) appends rather than overwrites the policy?

from serverless.

tibbe avatar tibbe commented on July 2, 2024

The IAM policy editor shows "Suggestions: Redundant Statement", so it agrees these statements are redundant.

from serverless.

tibbe avatar tibbe commented on July 2, 2024

Manually deleting all sections containing dynamodb:GetRecords except one, followed by a redeploy didn't recreate all those sections. This suggests that this perhaps has to do with either something that happened in an earlier serverless version or something that has to do with incremental updates of some sort.

from serverless.

tibbe avatar tibbe commented on July 2, 2024

My workaround from #12313 (comment) no longer works. I'm not sure why it ever did. Deploys are now completely blocked due to the number of dynamodb:GetRecords statements in the lambdaRole.

This is a rather serious problem. Our serverless stack is no longer deployable and we need to consider rather undesirable workarounds, like manually merging Lambdas to reduce the size of the IAM document.

from serverless.

tibbe avatar tibbe commented on July 2, 2024

I tried a workaround by using a custom role, however that doesn't help as the default lambdaRole policy still contains a copy of dynamodb:GetRecords and friends, even if the lambda doesn't use the default role.

from serverless.

tibbe avatar tibbe commented on July 2, 2024

I've updated to the latest version and confirmed the problem persists there:

Framework Core: 3.38.0 (local) 3.38.0 (global)
Plugin: 7.2.0
SDK: 4.5.1

from serverless.

tibbe avatar tibbe commented on July 2, 2024

Upon reading the code again it's please what's going on. We're adding the same statement (in particular, the same list of allowed actions) for each event stream processing function. This is unnecessary and only the list of resources needs to be updated per function. Fix: #12320

from serverless.

tibbe avatar tibbe commented on July 2, 2024

We're currently running a patched version of serverless to be able to deploy to production due to this bug. Could someone please take a look at the provided PR with the fix?

from serverless.

tibbe avatar tibbe commented on July 2, 2024

This is a production blocking issue for larger scale users of serverless with a simple fix provided as a PR. Could someone please take a look?

from serverless.

Related Issues (20)

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.