axiomhq / axiom-lambda-extension

Ingest logs and platform events from your lambda functions
14 stars 2 forks source link

Unable to add extension due to 'not authorized to perform: lambda:GetLayerVersion on resource' error. #35

Open brighttank opened 3 days ago

brighttank commented 3 days ago

I'm following the documentation but when I try to add the extension using the command: aws lambda update-function-configuration --function-name my_function_name --layers arn:aws:lambda:us-west-2:694952825547:layer:axiom-extension-arm64:10 --region us-west-2

I get the error: An error occurred (AccessDeniedException) when calling the UpdateFunctionConfiguration operation: User: arn:aws:iam::ACCOUNT_ID:user/username is not authorized to perform: lambda:GetLayerVersion on resource: arn:aws:lambda:us-west-2:694952825547:layer:axiom-extension-arm64:10 because no resource-based policy allows the lambda:GetLayerVersion action

Is the extension publicly available or do I need to build my own version?

bahlo commented 2 days ago

The extension is public—where did you get that ARN? Could you try again following the official docs, Install with AWS CLI?