alexcasalboni / alexcasalboni/aws-lambda-power-tuning

Initializer step function is failing due to IAM error

Ouverte
#260 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
6.1k
Forks
415
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

After deploying the aws power tuning in my account and trying to execute it,The Initializer step fail with the following error

` "cause": {
"errorType": "AccessDeniedException",
"errorMessage": "User: arn:aws:sts::xxxxxxx:assumed-role/serverlessrepo-aws-lambda-power-tun-initializerRole-l576tllQUOWO/serverlessrepo-aws-lambda-power-tuning-initializer-6adFhGV4OkoV is not authorized to perform: lambda:GetFunctionConfiguration on resource: arn:aws:lambda:xxxx xxxxx:function:xxxx:$LATEST because no identity-based policy allows the lambda:GetFunctionConfiguration action",
"trace": [
"AccessDeniedException: User: arn:aws:sts::xxxx:assumed-role/serverlessrepo-aws-lambda-power-tun-initializerRole-l576tllQUOWO/serverlessrepo-aws-lambda-power-tuning-initializer-6adFhGV4OkoV is not authorized to perform: lambda:GetFunctionConfiguration on resource: arn:aws:lambda:xxxxx:xxxxxxx:function:xxxxxxxxx:$LATEST because no identity-based policy allows the lambda:GetFunctionConfiguration action",`

am deploying the app using AWS Serverless Application Repository (SAR)
While deploying I passed the following parameters

{
lambdaResource:"arn:aws:lambda:xxxxx:xxxxxxx:function:xxxxxxxxx",
securityGroupIds:"sg-xxxxxxxxxxx",
subnetIds:"subnet-xxxxxxxxxxxxxxx"
...... rest are default values
}
```
Execution time Params
```
{
"lambdaARN": "arn:aws:lambda:xxxxxx:xxxxxxxx:function:xxxxxxx",
"powerValues": [
128,
256,
512,
1024,
2048,
3008
],
"num": 10,
"payload": "{}",
"parallelInvocation": true,
"strategy": "balanced"
}
```
I have verified that the required Policies are attached to the Initializer lambda step function

`{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"lambda:GetAlias",
"lambda:GetFunctionConfiguration",
"lambda:PublishVersion",
"lambda:UpdateFunctionConfiguration",
"lambda:CreateAlias",
"lambda:UpdateAlias"
],
"Resource": "arn:aws:lambda:xxxxx:xxxxxxx:function:xxxxxxxx",
"Effect": "Allow"
}
]
}`

Note :

setting the Resource to :"*" , is working fine , but what if I need to specify the least permission and only apply the poly on the lambda ARN only

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.