aws-samples / aws-lex-conv-faq

Demonstration of LLM integration into a lex bot using Lambda codehooks and a Sagemaker endpoint.
MIT No Attribution
11 stars 6 forks source link

unable to redeploy #4

Open reziakk opened 1 year ago

reziakk commented 1 year ago

I've made a successfully build of the demo, once and I've deleted all the resources at the end. Now, I'm trying to do the same process again and it doesn't creates all resources as it made in the first round. Already deleted the CDKToolkit template in cloudformation

Now it just creates the Asset bucket + ECR Repository + Images and thats it. when I run the cdk deploy and I'm attempting to do it in the same acocunt and the same region as before.

carbonless commented 7 months ago

You have to add a qualifier to the cdk.json file for every new build you do beyond the first one.

for example I use something like this: "@aws-cdk/core:bootstrapQualifier": "llama0112a" then when you bootstrap and deploy you need the following:

cdk --qualifier llama0112a bootstrap cdk deploy --qualifier llama0112a LexGenAIDemoFilesStack

I also change the Handler so I have a unique name for my endpoint:

In endpoint_handler.py

SAGEMAKER_ENDPOINT_NAME = "huggingface-pytorch-sagemaker-endpoint-llama0112a"