Skip to content
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

‼️ NOTICE: grantInvoke on SingletonFunction fails with "No child with id" #8295

Closed
nija-at opened this issue Jun 1, 2020 · 4 comments
Closed
Assignees
Labels
@aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug. management/tracking Issues that track a subject or multiple issues p0

Comments

@nija-at
Copy link
Contributor

nija-at commented Jun 1, 2020

Please add your +1 👍 to let us know you have encountered this


Status: FIX IDENTIFIED

Overview:

Calling grantInvoke on SingletonFunction produces the error No child with id: ....

This bug was introduced in version 1.39.0.

Workaround:

No workaround available

Solution:

PR for the fix - #8296

Related Issues:

#8240

@nija-at nija-at added needs-triage This issue or PR still needs to be triaged. management/tracking Issues that track a subject or multiple issues and removed needs-triage This issue or PR still needs to be triaged. labels Jun 1, 2020
@nija-at nija-at self-assigned this Jun 1, 2020
@nija-at nija-at added @aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug. p0 labels Jun 1, 2020
@nija-at nija-at pinned this issue Jun 1, 2020
@nija-at
Copy link
Contributor Author

nija-at commented Jun 1, 2020

Reproduction code -

import { ServicePrincipal } from '@aws-cdk/aws-iam';
import { Code, Runtime, SingletonFunction } from '@aws-cdk/aws-lambda';
import { App, Stack } from '@aws-cdk/core';

const app = new App();
const stack = new Stack(app, 'mystack');

const fn = new SingletonFunction(stack, 'fn', {
  code: Code.fromInline('foo'),
  runtime: Runtime.NODEJS_12_X,
  handler: 'index.handler',
  uuid: '92e0bbf2-10d2-427c-9f79-79f671303428',
});

fn.grantInvoke(new ServicePrincipal('events.amazonaws.com'));

Regression introduced in 1.39.0.

@nija-at
Copy link
Contributor Author

nija-at commented Jun 1, 2020

Bug introduced here - 1819a6b#diff-73cb0d8933b87960893373bd263924e2

@nija-at
Copy link
Contributor Author

nija-at commented Jun 1, 2020

PR for the fix - #8296

@SomayaB SomayaB added the pending-release This issue will be fixed by an approved PR that hasn't been released yet. label Jun 1, 2020
@shivlaks
Copy link
Contributor

shivlaks commented Jun 1, 2020

1.42.1 has been released and includes the fix for this issue.

@shivlaks shivlaks closed this as completed Jun 1, 2020
@shivlaks shivlaks removed the pending-release This issue will be fixed by an approved PR that hasn't been released yet. label Jun 1, 2020
@shivlaks shivlaks unpinned this issue Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug. management/tracking Issues that track a subject or multiple issues p0
Projects
None yet
Development

No branches or pull requests

3 participants