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

Graph preview doesn't work after setting Role for lambda #440

Open
tech-meppem opened this issue Jan 22, 2025 · 0 comments
Open

Graph preview doesn't work after setting Role for lambda #440

tech-meppem opened this issue Jan 22, 2025 · 0 comments

Comments

@tech-meppem
Copy link

tech-meppem commented Jan 22, 2025

The graph preview is failing to display, as soon as I set the Role Property on the Lambda Function.

IAM Role resource
  IAMRoleLambdaRawFile:
    Type: AWS::IAM::Role
    Properties:
      Path: /
      RoleName: !Join
        - "-"
        - [ !Ref "AWS::Region", !Ref "AWS::StackName", "lambda-raw-file-role" ]
      AssumeRolePolicyDocument:
        Statement:
        - Effect: Allow
          Principal:
            Service:
            - lambda.amazonaws.com
          Action:
          - 'sts:AssumeRole'
      Policies:
      - PolicyName: "root"
        PolicyDocument:
          Version: "2012-10-17"
          Statement:
          - Effect: "Allow"
            Action:
            - 's3:*'
            - 's3-object-lambda:*'
            - "dynamodb:*"
            - "iot:*"
            Resource: "*"
Lambda Function resource
  LambdaSetupFileUpload:
    Type: AWS::Lambda::Function
    Properties:
      FunctionName:
        Ref: SetupFileUploadLambdaName
      Handler: lambda_function.lambda_handler
      Runtime: python3.12
      Role: !GetAtt IAMRoleLambdaRawFile.Arn
      Code:
        S3Bucket: init-file-upload
        S3Key: Bundle_FileUpload.zip

Commenting out or removing the "Role" in lambda function successfully makes a graph.

Same thing happens when adding a "DependsOn", so I'm guessing it's something to do with the actual lines?

extension version: 0.26.1

VSCode About Me

Version: 1.96.4 (system setup)
Commit: cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba
Date: 2025-01-16T00:16:19.038Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.19045

Python 3.8

Python pip package details

Name: cfn-lint
Version: 1.22.5
Summary: Checks CloudFormation templates for practices and behaviour that could potentially be improved
Home-page: https://github.com/aws-cloudformation/cfn-lint
Author: Kevin DeJong
Author-email: [email protected]
License: MIT no attribution
Location: /home/netduma/.local/lib/python3.8/site-packages
Requires: aws-sam-translator, jsonpatch, networkx, pyyaml, regex, sympy, typing_extensions
Required-by:

Name: pydot
Version: 3.0.4
Summary: Python interface to Graphviz's Dot
Home-page: https://github.com/pydot/pydot
Author:
Author-email: Ero Carrera [email protected], Peter Nowee [email protected], Łukasz [email protected], "FeRD (Frank Dana)" [email protected]
License: MIT
Location: /home/netduma/.local/lib/python3.8/site-packages
Requires: pyparsing
Required-by:

Edit:
Updating to python 3.12 hasn't helped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant