[{"data":1,"prerenderedAt":67},["ShallowReactive",2],{"pattern-eventbridge-codebuild-sns":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":11,"deploy":13,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":26,"language":30,"level":31,"meta":32,"patternArch":33,"resources":52,"s3URL":6,"services":6,"stem":60,"testing":61,"videoId":6,"__hash__":66},"patterns\u002Fpatterns\u002Feventbridge-codebuild-sns.json","Running long-running scripts with CodeBuild",null,{"text":8},[9,10],"1. Delete the stack: \u003Ccode>sam delete --stack-name STACK_NAME\u003C\u002Fcode>.","2. Confirm the stack has been deleted: \u003Ccode>aws cloudformation list-stacks --query \"StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus\"\u003C\u002Fcode>",[12],"content\u002Fcontributors\u002Fguyu-ye.json",{"text":14},[15,16],"cd cdk","cdk deploy","Create a CodeBuild project triggered by a scheduled EventBridge rule.","json","AWS CDK",{"template":21},{"projectFolder":22,"repoURL":23,"templateURL":24,"templateFile":25},"eventbridge-codebuild-sns","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Feventbridge-codebuild-sns","serverless-patterns\u002Feventbridge-codebuild-sns","cdk\u002Fapp.py",{"headline":27,"text":28},"How it works",[29],"Developers sometimes encounter the 15-minute timeout limit for Lambda functions. This pattern demonstrates how to use AWS CodeBuild to run long-running scripts (scripts that run for more than 15 minutes) in a serverless application. This examples creates a CodeBuild project that runs a sample script triggered by a scheduled EventBridge rule, and a SNS topic to inform the completion of the CodeBuild project. A S3 bucket is also created to upload sample script.","Python","200",{},{"icon1":34,"icon2":39,"icon3":42,"line1":46,"line2":50},{"x":35,"y":36,"service":37,"label":38},20,50,"eventbridge","Amazon EventBridge",{"x":36,"y":36,"service":40,"label":41},"codebuild","AWS CodeBuild",{"x":43,"y":36,"service":44,"label":45},80,"sns","Amazon SNS",{"from":47,"to":48,"label":49},"icon1","icon2","",{"from":48,"to":51,"label":49},"icon3",{"bullets":53},[54,57],{"text":55,"link":56},"AWS Lambda enables functions that can run up to 15 minutes","https:\u002F\u002Faws.amazon.com\u002Fabout-aws\u002Fwhats-new\u002F2018\u002F10\u002Faws-lambda-supports-functions-that-can-run-up-to-15-minutes\u002F",{"text":58,"link":59},"Using AWS CodeBuild to execute administrative tasks","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fdevops\u002Fusing-aws-codebuild-to-execute-administrative-tasks\u002F","patterns\u002Feventbridge-codebuild-sns",{"text":62},[63,64,65],"1. You can test the solution by accessing the Lambda console, finding the Lambda function, and clicking Test in the Code Source section.","2. You can also invoke the function from the CLI using \u003Ccode>aws lambda invoke --function-name ENTER_FUNCTION_NAME output.txt\u003C\u002Fcode>.","3. Go to the S3 console, locate the deployed S3 bucket, and view the object has been written.","-5Xd-0FCnUhzKMyZ6sxQeYtpUCY9-54MIkavJC0TImw",1778846884469]