Inconsistent behavior across AWS constructs
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 71
Description
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](https://docs.aws.amazon.com/cdk/v2/guide/permissions.html#permissions_grants) 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.
Contributor guide
Research direction
Start with the behavior described in issue #31059 and the Lambda grantInvokeUrl method, then compare it with other Lambda grant methods and grant methods on other constructs. Read the linked AWS constructs and permissions documentation for the intended consistency guideline. Done means establishing the expected synthesis behavior and resolving the inconsistency with an agreed implementation and regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100