Skip to content

Help Needed – DIY Step in Prompt Engineer with Amazon Bedrock Lab: Lambda changes not detected

0

I'm working through the Prompt Engineer with Amazon Bedrock lab in AWS Skill Builder. The generated Lambda function correctly makes queries to Amazon Nova Pro. The lab's DIY step requires modifying and deploying the Lambda, but when I attempt validation, the platform doesn't detect any changes, and I can't move forward. What I have already done:

Modified modelId (e.g. switched from "amazon-nova-lite" to "amazon-nova-pro").

Tweaked parameters (temperature, maxTokens, etc.).

Added custom JSON fields and log statements.

Deployed the Lambda via AWS Console and CLI, ensuring correct version/alias is used.

Yet validation still doesn’t register any change. Could you clarify what specific modification the platform expects to detect in this DIY step? Is there a particular model ID, output format, alias, or environment variable required for Skill Builder to recognize the update?

asked a year ago165 views

2 Answers
0

Thank you for reaching out regarding the DIY Step validation issue in the Amazon Bedrock lab. I've successfully completed the lab and can guide you through the correct steps:

  1. Update the Lambda function code:
  • Take the improved code from the DIY section located in the last cell of the lab notebook
  • This specific code is crucial as the validation looks for these exact changes
  1. Package and Deploy:
  • Create a ZIP file with the updated Lambda function code
  • Update the existing Lambda function using this ZIP file
  1. Test the web application to verify the changes are working

These steps should resolve the validation issue you're experiencing. Let me know if you need any additional clarification!

AWS
EXPERT

answered a year ago

  • "Take the improved code from the DIY section located in the last cell of the lab notebook". This works, thanks a lot. I struggled long time.

0

Based on the information provided, you're experiencing an issue where the AWS Skill Builder lab isn't detecting your Lambda function changes during validation. This could be happening for several reasons.

First, it's worth checking if you're encountering an "UnknownError" when deploying your Lambda function. This error can occur due to various reasons including being in the incorrect AWS region, insufficient IAM permissions, or temporary account blocks.

When modifying Lambda functions for Bedrock integration, ensure you're making changes that will be detectable by the validation system. Some suggestions:

  1. Double-check that you're deploying to the correct Lambda function that the lab is monitoring. The lab might be looking at a specific function name or ARN.

  2. Verify that your changes are actually being saved and deployed. After making changes, confirm they appear in the Lambda console.

  3. Make more substantial changes that would be easily detectable, such as:

  • Changing the model ID (as you've done)
  • Adding new response fields
  • Modifying the function's core logic
  • Adding meaningful log statements that appear in CloudWatch
  1. Ensure you're using the correct runtime version for your Lambda function, as runtime version issues can sometimes cause deployment problems.

  2. If you're using Bedrock with a managed prompt, make sure your request structure is correct. For managed prompts, variables should be included directly in the top level of the request body rather than under a "promptVariables" key.

If you continue to face issues, you might want to contact AWS Support under the "Account and billing" category (which can be done free of charge) to investigate any account-specific factors that could be affecting your Lambda deployments or the lab validation process.
Sources
Lambda function deployment Issues and bedrock error | AWS re:Post
Troubleshoot Lambda function runtime version errors | AWS re:Post
Using Bedrock invokeModel API with prompt created in prompt management | AWS re:Post

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.