Lambda Function error when uploading in Service Catalog

0

Hey guys,

I wanted to create a new product in the service catalog. I followed this article to automate the account creation: https://aws.amazon.com/de/blogs/mt/automate-account-creation-and-resource-provisioning-using-aws-service-catalog-aws-organizations-and-aws-lambda/

Because we dont need the resources getting deployed with the configuration files from this article, I deleted them in Accountbaseline.yml and accountbuilder.yml and also removed the functions for their deployment in AccountCreationLambda.py . The AccountBuilderLambda and the LambdaExecuteRole event are executing successfully but the TriggerLambda event is in status "Create in progress" for a hour, then I get the error message:

The following resource(s) failed to create: [TriggerLambda]. Rollback requested by user.}, {LogicalResourceId : TriggerLambda, ResourceType : Custom::TriggerLambda, StatusReason : CloudFormation did not receive a response from your Custom Resource. Please check your logs for requestId [7dd4b91c-8ef2-4405-9e1c-6b45118b931a]. If you are using the Python cfn-response module, you may need to update your Lambda function code so that CloudFormation can attach the updated version.}, {LogicalResourceId : AccountBuilderLambda, ResourceType : AWS::Lambda::Function, StatusReason : Resource creation Initiated}, {LogicalResourceId : LambdaExecuteRole, ResourceType : AWS::IAM::Role, StatusReason : Resource creation Initiated}, {LogicalResourceId : SC-761183374848-pp-laowqzpxqaghw, ResourceType : AWS::CloudFormation::Stack, StatusReason : User Initiated}]

The only error I can find in the CloudWatch logs for the Lambda function is: [ERROR] Runtime.HandlerNotFound: Handler 'main' missing on module 'AccountCreationLambda'

I put the three files on GitHub: https://github.com/MarkWie/aws_template/blob/fecb660c79d41988018ffc96f202c88a69ef6c78/AccountCreationLambda.py The parts with the ''' ''' were commented out by me aswell as single lines with ##

Can anyone help with this issue?

Best regards Mark

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠