[{"data":1,"prerenderedAt":68},["ShallowReactive",2],{"pattern-eventbridge-scheduled-lambda-cdk":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":13,"deploy":15,"description":18,"extension":19,"framework":20,"gitHub":21,"highlight":6,"introBox":30,"language":34,"level":35,"meta":36,"patternArch":37,"resources":51,"s3URL":6,"services":60,"stem":61,"testing":62,"videoId":29,"__hash__":67},"patterns\u002Fpatterns\u002Feventbridge-scheduled-lambda-cdk.json","Scheduled Amazon EventBridge rule for AWS Lambda",null,{"headline":8,"text":9},"Cleanup",[10,11,12],"1. Delete the stack: \u003Ccode>npx cdk destroy\u003C\u002Fcode>.","2. Confirm the stack has been deleted: \u003Ccode>aws cloudformation list-stacks --query \"StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus\"\u003C\u002Fcode>.","3. You see a message confirming DELETE_COMPLETE.",[14],"content\u002Fcontributors\u002Fadilson-perinei.json",{"text":16},[17],"cdk deploy --context interval_in_minutes=\u003Cnumber>","Create an scheduled EventBridge rule that invokes a Lambda function","json","AWS CDK",{"template":22,"payloads":27},{"projectFolder":23,"repoURL":24,"templateURL":25,"templateFile":26},"eventbridge-scheduled-lambda-cdk-typescript","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Feventbridge-scheduled-lambda-cdk-typescript","serverless-patterns\u002Feventbridge-scheduled-lambda-cdk-typescript\u002F","lib\u002Feventbridge-scheduled-lambda-cdk-stack.ts",[28],{"headline":29,"payloadURL":29},"",{"headline":31,"text":32,"test":29},"How it works",[33],"This CDK pattern deploys a custom scheduled EventBridge rule that triggers a Lambda function. An environment variable contains the value assigned to the interval (in minutes) that the Lambda function will run.","TypeScript","100",{},{"icon1":38,"icon2":43,"line1":47},{"x":39,"y":40,"service":41,"label":42},20,50,"eventbridge","EventBridge",{"x":44,"y":40,"service":45,"label":46},80,"lambda","AWS Lambda",{"from":48,"to":49,"label":50},"icon1","icon2","Schedule",{"headline":52,"bullets":53},"Additional resources",[54,57],{"text":55,"link":56},"Reducing custom code by using advanced rules in Amazon EventBridge","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Freducing-custom-code-by-using-advanced-rules-in-amazon-eventbridge\u002F",{"text":58,"link":59},"Use Amazon EventBridge to Build Decoupled, Event-Driven Architectures","https:\u002F\u002Fserverlessland.com\u002Flearn\u002Feventbridge",{"from":41,"to":45},"patterns\u002Feventbridge-scheduled-lambda-cdk",{"headline":63,"text":64},"Testing",[65,66],"After waiting for the interval period, go to the Lambda console.","Find the deployed Lambda function, and open the CloudWatch Logs. You will see a new log event every minute.","DVX99V5NrMahtd2ZRsFHmgj1Q6zIMf_7JNLg6WbqF3g",1781519741853]