AWS StateMachine AccessDeniedException in step CleanUpOnError

0 votes

I am getting the following error when trying to execute step function on the lambda

"errorType": "AccessDeniedException",
  "errorMessage": "User: arn:aws:sts::14161:assumed-role/serverlessrepo-Functi-cleanerRole/serverlessrepo-=Function-p-cleaner is not authorized to perform: lambda:functionname on resource: arn:aws:lambda:function:functionname because no identity-based policy allows the lambda:functionname action",

Resources:
  FunctionExecutionRole: # Execution role for function
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
          - Effect: Allow
            Principal:
              Service: lambda.amazonaws.com
            Action: [
                "sts:AssumeRole",
                "lambda:InvokeAsync",
                "lambda:InvokeFunction"
            ]
            Resource: "*"
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/AWSLambda_FullAccess
        - arn:aws:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole
        - arn:aws:iam::aws:policy/CloudWatchReadOnlyAccess 
      Tags: 
        - Key: Application
          Value: !Sub '${ApplicationTag}'
  Function1:
    Type: AWS::Serverless::Function # Find or Create alias lambda function
    Properties:
      PackageType: Image
      ImageConfig:
        Command:
        - function1.lambda_handler
      ImageUri: 
      AutoPublishAlias: live # This property enables lambda function versioning. 
      Role: !GetAtt FindOrCreateAliasExecutionRole.Arn
      Tags: 
        Application: !Sub '${ApplicationTag}'  

I do not have permission to change IAM roles/policies/permissions

Jan 14, 2023 in AWS by Tejashwini
• 3,820 points

edited 5 days ago 8 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP