Skip to content

Inconsistent behavior across AWS constructs #31080

Open
@95Wictor

Description

@95Wictor

I opened another issue, #31059, describing a situation where the grantInvokeUrl method for Lambda functions raises an exception during synthesis, in a way that is inconsistent with other grant methods (of other constructs, and even of other grant methods of Lambda functions). This was closed, so I can't do anything there, and I believe closing it was a mistake. The person who closed the issue stated that there are source-code comments related to some decisions made by the developers. With the implication that this means it is not a bug. However, they did not provide any evidence that the developers were aware that their decisions would lead to inconsistent behavior across constructs. This inconsistency should be considered a bug, and I believe should be considered an issue even if the developers were aware of it.

AWS documentation at https://docs.aws.amazon.com/cdk/v2/guide/constructs.html states:

the AWS constructs that are included with the AWS Construct Library, such as s3.Bucket, follow guidelines and common patterns. This provides a consistent experience across all AWS resources.

Most AWS constructs have a set of grant methods that you can use to grant AWS Identity and Access Management (IAM) permissions on that construct to a principal.

Behaviors of AWS provided constructs should be consistent across all resource. It even mentions grant methods as an example. Thus any decision that leads to significant inconsistency is a bad decision.

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-lambdaRelated to AWS LambdabugThis issue is a bug.effort/mediumMedium work item – several days of effortp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions