Skip to content

is_valid_request #6

@davidholsgrove

Description

@davidholsgrove

I used version 0.5.2 of this custom resource to create a postgres db, but had used a hyphen in the database user and name. It didn't look like is_valid_request() prevented that...

My cloudformation stack hung on create. (I also didn't have an egress on the lambda security group which allowed access to SSM, which caused the password parameter retrieval to hang)

I then updated to version 0.5.4 (with python3.7 as per #5) but the deletes failed with the following;

[DEBUG] sending response to https://cloudformation-custom-resource-response-apsoutheast2.s3-ap-southeast-2.amazonaws.com/arn%3Aaws%3Acloudformation%[--snip--] ->
{
    "Status": "SUCCESS",
    "Reason": "invalid resource properties: 'db-test' does not match '^[_A-Za-z][A-Za-z0-9_$]*$'",
    "StackId": "arn:aws:cloudformation:ap-southeast-2:XXXXXXXXXXX:stack/CFN-App-Resources-dbDatabaseAndUser-JQ099EO81N57/[--snip--]",
    "RequestId": "XXXXXXX-XXXX-XXXX-XXXXXXXX",
    "LogicalResourceId": "DatabaseAndUser",
    "Data": {},
    "PhysicalResourceId": "CFN-App-Resources-dbDatabaseAndUser-JQ099EO81N57-DatabaseAndUser-17SKXEL5JB7FZ"
}

Just want to check if the is_valid_request() here https://github.com/binxio/cfn-resource-provider/blob/53a6afac8361393b2ae219c3a355e43db346e15e/cfn_resource_provider/resource_provider.py#L310 is expected to have caught that invalid property before the custom resource created?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions