sam deploy raises AccessDeniedException

0

Hello, Trying to deploy a stack with SAM using the following template:

  AWSTemplateFormatVersion: '2010-09-09'
  Transform: AWS::Serverless-2016-10-31
  Description: AWS Serverless Quarkus HTTP - rest-gateway-api
  Globals:
    Api:
      EndpointConfiguration: REGIONAL
      BinaryMediaTypes:
        - "*/*"

  Resources:
    RestGatewayApi:
      Type: AWS::Serverless::Function
      Properties:
        Handler: io.quarkus.amazon.lambda.runtime.QuarkusStreamHandler::handleRequest
        Runtime: java17
        CodeUri: function.zip
        MemorySize: 512
        Policies:
          - AWSLambdaBasicExecutionRole
          - AmazonAPIGatewayAdministrator
        Timeout: 15
        Events:
          GetResource:
            Type: Api
            Properties:
              Path: /{proxy+}
              Method: any

  Outputs:
    RestGatewayApiApi:
      Description: URL for application
      Value: !Sub 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/'
      Export:
        Name: RestGatewayApiApi

raises the following exception: AccessDeniedException (Service: Lambda Status Code: 403, Request ID: 8d07f42-6e3b-4dd8-985d-b79fc07d7d1e)" (RequestToken: 769f4a9e-0e50-45b6-889b-f8ea52538203, HandlerErrorCode: AccessDenied)

Nicolas
已提問 3 個月前檢視次數 101 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南