Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Deployment failing with Cannot find module '@aws-lambda-powertools/parameters/secrets' error #418

Closed
catcharbind opened this issue Jul 1, 2024 · 1 comment · Fixed by #422
Labels
bug Something isn't working

Comments

@catcharbind
Copy link

Describe the bug

Filling out this field will help us investigate the issue efficiently. Providing detailed information allows us to set the appropriate priority. We appreciate your cooperation.
A clear and concise description of what the bug is.

To Reproduce

Filling out this field will help us investigate the issue efficiently. Providing detailed information allows us to set the appropriate priority. We appreciate your cooperation.
Steps to reproduce the behavior:

During automated deployment, the Custom::SetupVectorStore resource fails to deploy.
The lambda function backing this custom resource is failing with the following error.

2024-07-01T17:44:40.322Z undefined ERROR Uncaught Exception
{
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module '@aws-lambda-powertools/parameters/secrets'\nRequire stack:\n- /var/task/index.js\n- /var/runtime/index.mjs",
"stack": [
"Runtime.ImportModuleError: Error: Cannot find module '@aws-lambda-powertools/parameters/secrets'",
"Require stack:",
"- /var/task/index.js",
"- /var/runtime/index.mjs",
" at _loadUserApp (file:///var/runtime/index.mjs:1087:17)",
" at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1119:21)",
" at async start (file:///var/runtime/index.mjs:1282:23)",
" at async file:///var/runtime/index.mjs:1288:1"
]
}

I have tried to deploy the stack in both us-east-1 and us-west-2 regions. Both times in failed with the same error.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

@statefb statefb added the bug Something isn't working label Jul 2, 2024
@statefb
Copy link
Contributor

statefb commented Jul 2, 2024

Possible cause: https://github.com/aws/aws-cdk/releases/tag/v2.147.3

lambda-nodejs: breaking change in esbuild causes import module error (aws/aws-cdk#30726) (06c14b1), closes aws/aws-cdk#30717

Cupprum added a commit to Cupprum/GreenMoStalker that referenced this issue Jul 5, 2024
after one of dependabot updates, i started to get the following exception: Error: Cannot find module '@aws-lambda-powertools/parameters/ssm. Seems like its connected to the following issue aws-samples/bedrock-claude-chat#418 and the following release https://github.com/aws/aws-cdk/releases/tag/v2.147.3 should fix the issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants