aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
Verbose error logging message for AWS::Lambda::Permission Principal errors
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
AWS::Lambda::Permission
### Resource name
_No response_
### Description
Currently within Cloudformation, if you attempt to use the AWS::Lambda::Permission resource and your Permissions preexisting on the Lambda function that is being targeted is invalid or the Principal provided within the resource is invalid you are prompted with this error message:
"The provided principal was invalid. Please check the principal and try again. "
This error while I believe it's intent is to be shown when the Principal in the AWS::Lambda::Permission resource itself is invalid, it actually shows the same message if the currently existing Lambda Function Permissions are invalid and you attempt to use the AWS::Lambda::Permission to add additions to the principal on the Lambda function.
My request is to update the error message to something more verbose like the following:
"The provided principal or policy currently existing on the Lamda Function is invalid. Please check the principal and try again."
This could narrow down troubleshooting to beyond just a Cloudformation stack but also to an invalid principal preexisting on a Lambda Function.
### Other Details
_No response_
Contributor guide
Research direction
Start by reproducing the AWS::Lambda::Permission failure with an invalid existing Lambda permission and with an invalid Principal in the resource, comparing the resulting messages. Check whether the error text is controlled in this repository or by the CloudFormation/Lambda service. Done means the message distinguishes an invalid supplied principal from an invalid existing policy or permission.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100