binxio / cfn-secret-provider

A CloudFormation custom resource provider for deploying secrets and keys
Apache License 2.0
141 stars 70 forks source link

Error : "Handler 'handler' missing on module 'secrets'" when deployed from zip #59

Closed kzhou57 closed 1 year ago

kzhou57 commented 1 year ago

I have tried both 1.4.4 and 2.0.1 zip file

My cloudformation looks like following:

  CFNSecretProvider:
    Type: AWS::Lambda::Function
    DependsOn:
      - LambdaRole
    Properties:
      Description: CloudFormation Custom:Secret implementation
      Code:
        S3Bucket: !Sub '${LambdaS3Bucket}'
        S3Key: !Sub '${LambdaS3Path}/cfn-secret-provider-2.0.1.zip'
      FunctionName: 'binxio-cfn-secret-provider'
      Handler: secrets.handler
      MemorySize: 128
      Timeout: 30
      Role: !GetAtt 'LambdaRole.Arn'
      Runtime: python3.9
mvanholsteijn commented 1 year ago

Hi @kzhou57, I cannot reproduce this and the demo works. Please checkout how your deployment differs from https://github.com/binxio/cfn-secret-provider/blob/master/cloudformation/cfn-resource-provider.yaml

Cheers,

Mark