Giter Site home page Giter Site logo

Comments (6)

jchannon avatar jchannon commented on May 29, 2024

Just had a the same error message in a .net app. No idea what it means

from aws-secrets-manager-rotation-lambdas.

ThinTim avatar ThinTim commented on May 29, 2024

If it helps at all, I get that error when there's no version with the given label for the given secret:

aws secretsmanager get-secret-value --secret-id my_secret --version-stage RANDOM 

An error occurred (ResourceNotFoundException) when calling the GetSecretValue operation: Secrets Manager can’t find the specified secret value for staging label: RANDOM

If that's the case, a possible resolution would be to just assign the AWSCURRENT label to whatever version of your secret you're currently using:

aws secretsmanager update-secret-version-stage --secret-id my_secret --version-stage AWSCURRENT  --move-to-version-id whatever_current_version_id_is

If it's already assigned to something else, I believe this call would raise an error asking for explicit version IDs for both sides of the transaction.

from aws-secrets-manager-rotation-lambdas.

sb-ovo avatar sb-ovo commented on May 29, 2024

Thx @ThinTim , but in my case it's not going to help.

I'm creating secrets using Terraform, and since I set these to rotate automatically, AWS starts a rotation process right away after creation.

That means I have no control over the versions/stages, AWS is triggering all that and calling my Lambda function automatically. (probably a step function behind the scene)
And that's the issue: when calling Lambda, AWS sends me a token that is supposed to match a stage... but doesn't match anything when I fetch data from the secretsmanager API.

from aws-secrets-manager-rotation-lambdas.

rstevens011 avatar rstevens011 commented on May 29, 2024

Terraform may be rotating the secret before putting a initial secret value. Terraform makes a distinction between a secret and a secret version. It'd probably be helpful to have a look at your CloudTrail logs to see the individual API calls and the order they are called in.

from aws-secrets-manager-rotation-lambdas.

ayshamdmgit avatar ayshamdmgit commented on May 29, 2024

@sb-ovo Were you able to resolve this?

from aws-secrets-manager-rotation-lambdas.

joebaro avatar joebaro commented on May 29, 2024

If you are still experiencing this issue please open a support case with AWS.

from aws-secrets-manager-rotation-lambdas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.