Bref: is not authorized to perform: lambda:GetLayerVersion on resource

Created on 26 Mar 2020  路  10Comments  路  Source: brefphp/bref

Hi, all of a sudden I started getting this error:

An error occurred: ApiLambdaFunction - User: xxx is not authorized to perform: lambda:GetLayerVersion on resource: arn:aws:lambda:eu-west-1:209497400698:layer:php-74:6 (Service: AWSLambdaInternal; Status Code: 403; Error Code: AccessDeniedException; Request ID: 50006e03-e277-4f31-8785-3b942b6b8612).

Since you're currently doing something with layers, I think it must be on your end :) Thank you.

bug

Most helpful comment

It's an issue of tha latest layer versions. Switching from ${bref:layer.php-74} to arn:aws:lambda:eu-west-1:209497400698:layer:php-74:5 works.

All 10 comments

It's an issue of tha latest layer versions. Switching from ${bref:layer.php-74} to arn:aws:lambda:eu-west-1:209497400698:layer:php-74:5 works.

I am getting the same error with ${bref:layer.php-73} "user/manuel is not authorized to perform: lambda:GetLayerVersion on resource: arn:aws:lambda:us-west-2:209497400698:layer:php-73:20 " , i will try to check lowering the version to 19 an test

it works changing
${bref:layer.php-73} to arn:aws:lambda:us-west-2:209497400698:layer:php-73:19
And
${bref:layer.php-73-fpm} to arn:aws:lambda:us-west-2:209497400698:layer:php-73-fpm:19

this would be the fix for now.

I'm getting right now the same error

It looks like the layer building failed. https://github.com/brefphp/bref/runs/537308863

@mnapoli Maybe after successful layer build / publish is when the release should be tagged and layers.json updated?

tagging @mnapoli. I think if you re-run the action again it should be ok.

Apologies for not seeing this notification (in the lot I receive). We did discuss that yesterday in Slack, and I've been rebuilding new layers since then ^^

Turns out I built the previous release from my laptop, and published the layers via an unreliable 4g connection. The publishing failed midway, and I restarted it manually with some changes. That was a mistake.

Yesterday I decided to rebuild everything from an EC2 box (so that my network connection is not a problem anymore). I went with a cheap EC2, that was my second mistake. The compilation ran all night, some apt update cron ran as well in the night, and in the morning it was still not finished.

I killed everything, restarted from a large EC2 and this was much faster. I finally managed to test everything again this morning. I have tagged a new release which should fix this.

Let me know if you have any issue with the new release, sorry again.

No worries @mnapoli and thank you!

Did you think about building the layers in GitHub Actions or Travis CI? Shouldn't cost you anything thanks to Bref being open-source.

Yes, the thing though is that I need to build the layers, then update layers.json in the project, then test the layers (with the functional tests), then only tag the release ^^

It's OK for now, I build new layers max every month, sometimes less often. Since the coronavirus outbreak I don't have a fiber connection anymore, otherwise it's usually a piece of cake.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

t-geindre picture t-geindre  路  5Comments

anandvns picture anandvns  路  8Comments

kwn picture kwn  路  8Comments

zemiacsik picture zemiacsik  路  8Comments

mnapoli picture mnapoli  路  6Comments