Lambda is not authorized to perform: secretsmanager:GetSecretValue

0

I've setup the following policy on the my role.

{
            "Action": [
                "secretsmanager:GetSecretValue"
            ],
            "Resource": "arn:aws:secretsmanager:us-west-2:354135999999:secret:beta/Secrets-2ZZZZZZ",
            "Effect": "Allow"
        }

But I keep getting this error when my lamba website tries to startup. It's using .NET Core 2.1.

User: arn:aws:sts::354135999999:assumed-role/Dragnet-Beta-LambdaRole-1O22YYYYYYYYY/Dragnet-Beta-WebsiteLambda-11AZX4HXXXXXX is not authorized to perform: secretsmanager:GetSecretValue on resource: arn:aws:secretsmanager:us-west-2:354135999999:secret:beta/Secrets-2ZZZZZZ

I've used the policy simulator and when I paste in the ARN in the error message it says "Allowed". So I'm really confused as to why my Lambda can't get the secret.

I have triple checked the role and policy it's using are what are showing up in the error message and that the lambda is configured with the matching role.

질문됨 5년 전3834회 조회
1개 답변
0

Fixed it.

I just changed the memory size of the Lambda a little bit and Saved the change to force it to reload from cache. It then picked up the correct permissions and everything worked.

Thanks

답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠