The Smart Product Solution is a customer deployable reference architecture to help manufacturers to jumpstart development of innovative connected/smart product services.
Apache License 2.0
28
stars
20
forks
source link
Stack creation fails on CICDCustomResource creation #23
I have run through the build as per the readme instructions.
The stack creation gets to the CICDCustomResource step and fails with event description:
Received response status [FAILED] from custom resource. Message returned: See the details in CloudWatch Log Stream: 2022/07/11/[$LATEST]f6f0c3911a0045189d0eb9f2d5768fe7 (RequestId: 6279b397-813e-4472-93bf-ccff21981233)
I can see that the lambda fails on requesting the file smart-product-solution.zip from the s3 bucket. This s3 bucket is correct but the file smart-product-solution.zip does not exist.
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}`
};
Logger.log(
Logger.levels.ROBUST,
`${event.LogicalResourceId}:${event.RequestType}` //<< this logs "xincIoT/1.0.0/smart-product-solution.zip"
);
const file = fs.createWriteStream('/tmp/smart-product-solution.zip');
let smartProductData = await s3.getObject(s3params).promise();//<<<This line here is where is fails
file.write(smartProductData.Body, () => {
file.end();
});
I have looked through build-s3-dist.sh and can't see anywhere that references smart-product-solution.zip.
Is there something missing here?
I have run through the build as per the readme instructions. The stack creation gets to the CICDCustomResource step and fails with event description:
Cloudwatch logs for the event shows:
I can see that the lambda fails on requesting the file smart-product-solution.zip from the s3 bucket. This s3 bucket is correct but the file smart-product-solution.zip does not exist.
I have looked through build-s3-dist.sh and can't see anywhere that references smart-product-solution.zip. Is there something missing here?