In aws codepipeline source section it shows two options:
1. Create EventBridge rule to automatically detect source changes
2. Use AWS CodePipeline to check periodically for changes
But now you only see one option that is first one if u select this it will create eventbridge rule and if you did not select it it will by default choose this option ==> Use Amazon CloudWatch Events to automatically start my pipeline when a change occurs.
(( I think aws update its console that's why the second option is gone ))
so if u do not want to create event bridge rule to trigger pipeline whenever you pushes code to s3 u can choose this option > Use AWS CodePipeline to check periodically for changes
TO acheive this create aws code pipeline and in source choose s3 and then bucket name and object key . and uncheck this option : Create EventBridge rule to automatically detect source changes.
after this configure your target normally whether it is codedeploy or other services.
now after created a pipeline pipeline will trigger automatically because when u create a pipeline first time it triggers automatically.
now got to codepipeline > pipelines > select your pipeline > Edit > edit source choose edit stage > click on pencil icon where source s3 is written > here u can se **Change detection options is set to **
Amazon CloudWatch Events (recommended) now check or select the Use AWS CodePipeline to check periodically for changes this option now aws codepipeline auto looks for change in s3 now if u upload any object in s3 bucket codepipeline will trigger. sometimes it takes 40-50 seconds to trigger so u have to wait.
IF u want to create a event bridge rule for this u can see this aws docs :
https://docs.aws.amazon.com/codepipeline/latest/userguide/create-cloudtrail-S3-source-console.html