CodexBloom - Programming Q&A Platform

Trouble with AWS CodePipeline and CodeDeploy: Deployment scenarios with 'Deployment Group Not Found'

👀 Views: 2 💬 Answers: 1 📅 Created: 2025-06-03
aws devops codepipeline codedeploy yaml

I'm trying to implement I'm working on a project and hit a roadblock... I'm currently working with an scenario when trying to deploy my application using AWS CodePipeline integrated with CodeDeploy. My pipeline is set up to trigger on commits to the master branch of my repository, which is hosted on GitHub. However, every time the pipeline reaches the deployment stage, I get the following behavior: `Deployment failed. Deployment group 'my-deployment-group' not found.` I have verified that the deployment group does exist in my CodeDeploy setup, and it is indeed associated with the correct application. My `buildspec.yml` file is set up as follows: ```yaml version: 0.2 phases: install: runtime-versions: nodejs: 14 commands: - npm install build: commands: - npm run build artifacts: files: - '**/*' dispose: files: - '**/*' ``` In the CodePipeline configuration, I have ensured that the deployment is pointing to the right CodeDeploy application and deployment group. The `appspec.yml` is also in place, structured like this: ```yaml version: 0.0 os: linux files: - source: / destination: /var/app/current hooks: AfterInstall: - location: scripts/start_server.sh timeout: 300 runas: root ``` I’ve checked the IAM roles associated with both CodePipeline and CodeDeploy, making sure they have the necessary permissions. I even manually tested deployment through the CodeDeploy console, and that worked successfully. As a troubleshooting step, I also added logging to my deployment scripts to see if any part of the process is failing silently. Despite all this, the pipeline keeps throwing the same behavior. Could anyone provide insights on what might be going wrong, or what configurations I might be missing? Any help would be greatly appreciated! Am I approaching this the right way? I recently upgraded to Yaml 3.9. Am I approaching this the right way?