aws-samples / retail-demo-store

AWS Retail Demo Store is a sample retail web application and workshop platform demonstrating how AWS infrastructure and services can be used to build compelling customer experiences for eCommerce, retail, and digital marketing use-cases
MIT No Attribution
726 stars 515 forks source link

Deploy failed due to CustomLoadDataProducts #626

Closed jingnanl closed 2 months ago

jingnanl commented 2 months ago

I'm trying to deploy the solution with the latest code (commit a45530a) but failed.

Status reason Embedded stack arn:aws:cloudformation:us-west-2:012870276471:stack/retaildemostore-DeploymentSupport-7F45MPQBWCLN/f7d34d10-66a2-11ef-b88d-069aa8cc439f was not successfully created: The following resource(s) failed to create: [CustomLoadDataProducts].

Look into the nested stack DeploymentSupport

CloudFormation did not receive a response from your Custom Resource. Please check your logs for requestId [86b3e845-2b18-4176-82dc-b911199661a7]. If you are using the Python cfn-response module, you may need to update your Lambda function code so that CloudFormation can attach the updated version.

Not sure if it's related to the recent change of #624.

BastLeblanc commented 2 months ago

Hi,

This fails most probably because an underlying issue in deploying the products service.

To help debug the issue, can you look at and share :

How did you deploy the demo store? Any parameters did you change?

jingnanl commented 2 months ago

Hi,

It looks like the ProductsService nested stack was created successfully prior to the DeploymentSupport stack creation failure.

In the cloudwatch logs for DeploymentS-LoadDataLambdaFunction, I saw a lot of 404 errors image

I was using the CloudFormation template generated by the ./stage.sh script to deploy the demo store. I've tried several times, with least services (only basic demo store) and most services (including Personalize and Pinpoint etc.), all failed. I was not using the default stack name, and I selected S3 Deployment Type.

Thanks,

mridehalgh commented 2 months ago

Hi @jingnanl Can you go into CodePipeline? Are all the deployments showing successful? Pay special attention to the products service deployment too.

jingnanl commented 2 months ago

Hi @jingnanl Can you go into CodePipeline? Are all the deployments showing successful? Pay special attention to the products service deployment too.

Previously I was using the CloudFormation template quick link, the ProductsService was rollback and deleted upon deployment failure, the nested stack didn't show any failure. This time I deployed the template manually with auto rollback disabled and I saw all the CodePipelines were failed due to s3 bucket not versioned. image

I will enable the bucket versioning and retry (will update the result later). If that's the root cause, please update the deployment instructions

We recommend to create a dedicated bucket for deployment with versioning enabled.

It should be mandatory rather than recommended.

jingnanl commented 2 months ago

Update: the deployment succeeded after I enabled s3 bucket versioning. Please update the instructions accordingly and feel free to close the issue. Thanks!

mridehalgh commented 2 months ago

Thanks for the feedback @jingnanl - will get clearer wording out shortly.

mridehalgh commented 2 months ago

@jingnanl - docs updated. Thanks for your feedback.