(ec2.KeyPair): Provide better descriptive response than showing "Resource handler returned message: "null""
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the bug
I have a following message when creating a new keypair:
```
Resource handler returned message: "null" (RequestToken: e736f836-0250-d35d-3b71-9762d9a7f44a, HandlerErrorCode: InternalFailure)
```
here is how I create it:
```
//create keypair
const keyPairName = 'solace-keypair';
const keyPair = new KeyPair(this, 'solaceKeypair', {
keyPairName,
});
```
What could go wrong?
### Expected Behavior
It's ok if it fails, I expect that returned message from the resource is not null
### Current Behavior
Currently it is hard to guess what happens because message is null
### Reproduction Steps
may be to apply mentioned code. Not sure, may be it depends on my account/permissions
### Possible Solution
_No response_
### Additional Information/Context
_No response_
### CDK CLI Version
2.142.1 (build ed4e152)
### Framework Version
_No response_
### Node.js Version
v20.12.0
### OS
Debian GNU/Linux 11 (bullseye)
### Language
TypeScript
### Language Version
_No response_
### Other information
_No response_
Contributor guide
Research direction
Start from the AWS CDK ec2.KeyPair construct and reproduce the failure using the issue's TypeScript example, CDK CLI 2.142.1, and the reported environment. Trace the CloudFormation resource response to determine why the failure message is null; done means failed key-pair creation reports a descriptive non-null message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100