- Newest
- Most votes
- Most comments
The issue you're experiencing is likely related to limitations of AWS CodeBuild when using Lambda compute mode. While the CloudFormation template and the API calls appear to be similar for both EC2 and Lambda modes, there are some important restrictions to consider when using Lambda compute mode in CodeBuild.
When using Lambda compute mode for CodeBuild:
-
The maximum project duration is limited to 15 minutes. Custom build timeouts are not supported.
-
Local caching is not supported.
-
Batch builds are not supported.
-
Docker image builds are not supported.
-
There may be limitations on artifact handling, which could be causing the error you're seeing.
The error message "Invalid CodePipeline artifact: must be a valid S3 arn" suggests that there might be an issue with how CodeBuild is interpreting or handling the artifact information when using Lambda compute mode.
To resolve this issue, you might need to:
-
Ensure that your buildspec file is compatible with Lambda compute mode and doesn't rely on features not supported in this mode.
-
Check if your project requires any of the unsupported features mentioned above.
-
Verify that the S3 bucket permissions are correctly set for Lambda compute mode.
-
Consider simplifying your artifact configuration to see if it resolves the issue.
If the problem persists, you may need to revert to using EC2 compute type for your CodeBuild project, especially if your build process requires features not supported in Lambda compute mode. Alternatively, you could reach out to AWS support for further assistance in troubleshooting this specific error with Lambda compute mode.
Sources
AWS CodeBuild adds support for AWS Lambda compute mode | AWS DevOps Blog
AWS::CodeBuild::Project Artifacts - AWS CloudFormation
Relevant content
- asked a year ago
