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

sidecar-deployment-user is not authorized to perform: lambda:GetLayerVersion in me-south-1 #95

Open
BasemHamad opened this issue Oct 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@BasemHamad
Copy link

BasemHamad commented Oct 10, 2023

this happens only in me-south-1 region , it works fine in us-west-2

when run : php artisan sidecar:deploy --activate

AccessDeniedException (client): User: arn:aws:iam::**:user/sidecar-deployment-user is not authorized to perform: lambda:GetLayerVersion on resource: arn:aws:lambda:me-south-1:821527532446:layer:sidecar-browsershot-layer:1 because no resource-based policy allows the lambda:GetLayerVersion action - {"Message":"User: arn:aws:iam::13286269**944:user/sidecar-deployment-user is not authorized to perform: lambda:GetLayerVersion on resource: arn:aws:lambda:me-south-1:821527532446:layer:sidecar-browsershot-layer:1 because no resource-based policy allows the lambda:GetLayerVersion action"}

the user policy :

`

"Version": "2012-10-17",
"Statement": [
	{
		"Sid": "VisualEditor0",
	"Effect": "Allow",
		"Action": "iam:PassRole",
		"Resource": "*",
		"Condition": {
			"StringEquals": {
				"iam:PassedToService": "lambda.amazonaws.com"
			}
	}
	},
	{
		"Sid": "VisualEditor1",
		"Effect": "Allow",
		"Action": [
			"states:*",
			"ecr:SetRepositoryPolicy",
			"lambda:*",
			"ecr:GetRepositoryPolicy"
		],
		"Resource": "*"
	},
	{
		"Sid": "VisualEditor2",
		"Effect": "Allow",
		"Action": [
			"logs:DescribeLogStreams",
			"logs:GetLogEvents",
			"logs:FilterLogEvents"
		],
		"Resource": "arn:aws:logs:*:*:log-group:/aws/lambda/*"
	},
	{
		"Sid": "VisualEditor3",
		"Effect": "Allow",
		"Action": "s3:*",
		"Resource": [
			"arn:aws:s3:::sidecar-*",
			"arn:aws:s3:::sidecar-*/*",
			"arn:aws:s3:::*"
		]
	}
]

`

@stefanzweifel
Copy link
Owner

Hi Basem,

Both chrome-aws-lambda-layer and sidecar-browsershot-layer have not been deployed to me-south-1.

chrome-aws-lambda-layer is not maintained by me. You would have to create an issue in their repository to request a deployment to me-south-1.

sidecar-browsershot-layer is maintained by me. One chrome-aws-lambda-layer has been updated, I can deploy the layer to me-south-1 as well. (Would be great if you could create an issue in that repository as well.)

@stefanzweifel stefanzweifel added the bug Something isn't working label Oct 10, 2023
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

No branches or pull requests

2 participants