In buildspec.yml, the artifacts files list must contain real file paths relative to the build working directory, not the name of the CodePipeline input or output artifact. List what the build actually produced, for example files: appspec.yml, target/SampleMavenTomcatApp.war, scripts/* . If UPLOAD_ARTIFACTS reports No matching artifact paths found, the glob matched zero files; check the paths against what the build phase really emitted (ls the workspace in post_build to see). The CodePipeline artifact name belongs in the pipeline definition, never in buildspec artifacts.

Context: Stack Overflow #41626522 (accepted answer, 30 votes): the Source action in CodePipeline works, but the Build step fails at UPLOAD_ARTIFACTS with No matching artifact paths found. The log shows it trying to expand the CodePipeline output artifact name. The accepted answer identifies the mix-up: the asker listed the CodePipeline artifact name in the buildspec artifacts section instead of actual file paths.