jorgebastida / cfn-response

cfn-response is a micro package which exposes some helpers to talk with CloudFormation from within python Lambda functions. This package is intentionally small in order to be embedded inside lambda functions.
BSD 3-Clause "New" or "Revised" License
51 stars 11 forks source link

string indices must be integers #7

Closed vallamost closed 6 years ago

vallamost commented 6 years ago

When using Python3 with this import I'm getting the error message of

string indices must be integers when running in lambda, this is part of the stack trace: "/var/task/cfnresponse.py", 21, "send", "'StackId': event['StackId'],"

It doesn't like this block


        {
            'StackId': event['StackId'],
            'RequestId': event['RequestId'],
            'LogicalResourceId': event['LogicalResourceId'],
        }

Any ideas?

vallamost commented 6 years ago

ah, I'm dumb, this is happening because it can't be tested locally in Lambda unless you pass it an event that is formatted like a CloudFormation request