CodexBloom - Programming Q&A Platform

AWS CodePipeline Not Triggering Deployment on S3 Artifact Change with 'No Change' Message

👀 Views: 1 đŸ’Ŧ Answers: 1 📅 Created: 2025-06-09
AWS CodePipeline S3 ECS CloudFormation yaml

This might be a silly question, but I'm currently facing an issue where my AWS CodePipeline is not triggering a deployment when there is a change to the S3 artifact. The pipeline is supposed to deploy a new version of my Docker image to ECS whenever a new version is uploaded to the specified S3 bucket. However, despite the fact that I am uploading a new file with a different name, the pipeline logs indicate a 'No Change' message, and the deployment does not occur. Here's a snippet of my pipeline configuration in AWS CloudFormation: ```yaml Resources: MyPipeline: Type: "AWS::CodePipeline::Pipeline" Properties: RoleArn: !GetAtt CodePipelineRole.Arn ArtifactStore: Type: "S3" Location: !Ref MyArtifactStore Stages: - Name: SourceStage Actions: - Name: S3Source ActionTypeId: Category: Source Owner: AWS Provider: S3 Version: "1" OutputArtifacts: - Name: SourceOutput Configuration: S3Bucket: !Ref MySourceBucket S3ObjectKey: "my-folder/my-image-${{ version }}.tar" PollForSourceChanges: true - Name: DeployStage Actions: - Name: ECSDeploy ActionTypeId: Category: Deploy Owner: AWS Provider: ECS Version: "1" InputArtifacts: - Name: SourceOutput Configuration: ClusterName: !Ref MyCluster ServiceName: !Ref MyService FileName: "imagedefinitions.json" ``` I have verified that the `S3ObjectKey` is indeed pointing to the new file, and I can see the new file in the S3 bucket. I also confirmed that the IAM roles associated with the CodePipeline and the S3 bucket have the necessary permissions. Additionally, I have tried manually triggering the pipeline using the AWS CLI: ```bash aws codepipeline start-pipeline-execution --name MyPipeline ``` But the same 'No Change' message appears in the logs, and the deployment doesn't proceed. I've checked the pipeline execution history, and it shows no errors, just that it evaluated the source and decided there was no change. What could be causing this behavior? Is there anything specific in the S3 object configuration or the CodePipeline setup that I might be overlooking? This is part of a larger application I'm building. I'd really appreciate any guidance on this.