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

EC2 Key Pair creation fails with unhelpful error #1711

Open
marios-zindilis opened this issue Jun 13, 2023 · 0 comments
Open

EC2 Key Pair creation fails with unhelpful error #1711

marios-zindilis opened this issue Jun 13, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@marios-zindilis
Copy link

marios-zindilis commented Jun 13, 2023

Name of the resource

Other

Resource name

AWS::EC2::KeyPair

Description

This was originally reported in CDK in aws/aws-cdk:25929. When the value of PublicKeyMaterial is not well formatted, the creation of AWS::EC2::KeyPair fails with unhelpful error like:

Resource handler returned message: "null" (RequestToken: c6817ee0-0c65-b552-f35f-336715c567ce, HandlerErrorCode: InvalidRequest)

CloudFormation snippet to reproduce:

Resources:
  MyKeyPair:
    Type: AWS::EC2::KeyPair
    Properties:
      KeyName: keyName
      PublicKeyMaterial: somethingInvalid

It would be great if CloudFormation propagated the error from the back-end service.

Other Details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant