Closed iotFab closed 4 years ago
The problem is in line 64 of /source/resources/cicd/index.js
const _repo = process.env.CODECOMMIT_REPO
const s3Bucket = process.env.CODE_BUCKET;
const s3Key = process.env.CODE_KEY;
const codeSource = process.env.CODE_SOURCE;
const s3params = {
Bucket: s3Bucket,
Key: `${s3Key}/${codeSource}`
};
const file = fs.createWriteStream('/tmp/smart-product-solution.zip');
let smartProductData = await s3.getObject(s3params).promise();
according to the environment variable, this process is looking for a file inside our s3 bucket. We don't have the access because this particular file is not present.
Could you tell us what should be in that file and from where it comes ?
@iotFab Did you find a fix for this? I have the same issue
@halfn0rmal I retry part of it and did not see the error anymore
@iotFab Thanks for you reply. I can see smart-product-solution.zip does not exist on my s3 bucket. Was the issue that the lambda that fails did not have permission to create this file? Or that the build did not create smart-product-solution.zip so the lambda can not access it? I will try your suggestions.
Can this issue be reopened? I have my s3 buckets public but the issue is still there. I have no smart-product-solution.zip. I can't see where this gets created during the build?
Solution Cloudformation deployment give the following error : CICDCustomResource
Failed to create resource. See the details in CloudWatch Log Stream: 2020/07/29/[$LATEST]cfe1b0bcd6df42bf82ef3b195399f041
Inside that log stream I found the following logs :
The code block responsible for this error is :
How to investigate this further ? Thank you, Fabian