
Define an Amazon Bedrock managed prompt and a published version in AWS CloudFormation and invoke it from AWS Lambda through Converse.
git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/bedrock-prompt-management-lambda/python/samsam buildsam deploy --guidedaws lambda invoke --region REGION --function-name FUNCTION_NAME --cli-binary-format raw-in-base64-out --payload file://event.json out.json, then edit the prompt, publish a new version, and repoint the function to see the output change with no code change. Pass --region on every command so that the Region matches the one you deployed to. See the README for detailed instructions.sam delete --stack-name STACK_NAME --region REGION. Enter y at each confirmation prompt.aws cloudformation list-stacks --region REGION --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus".rm -f event.json out.json out2.json out3.json. The Amazon S3 bucket the AWS SAM CLI manages for deployment artifacts is shared by every AWS SAM deployment in that account and Region, so it is not removed.