Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

API Gateway sage maker end point

Đang mở
#687 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
aws
Lĩnh vực
api, cloud

Hướng nghiên cứu

Bắt đầu với serverless.yaml, đặc biệt là phần tích hợp của ApiGatewayMethod và thiết lập Credentials đang được chú thích, sau đó theo dõi các tài nguyên ApiGatewayRestApi, ApiGatewayResource và deployment được tham chiếu. So sánh cấu hình với lỗi API Gateway được báo cáo và các yêu cầu của endpoint SageMaker; hoàn tất nghĩa là ví dụ được triển khai thành công và gọi endpoint.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I want to create API Gateway for Sagemaker end point using serverless.yam. Its failing .

An error occurred: ApiGatewayMethod - Role ARN must be specified for AWS integrations (Service: AmazonApiGateway; Status Code: 400; Error Code: BadRequestException; Request ID: cb987b30-1ea1-4877-b6b9-e2817d7462b3; Proxy: null).

looks like my template is wrong...could any one help me with api gateway example

serverless.yaml

> ApiGatewayRestApi:
  Type: AWS::ApiGateway::RestApi
  Properties:
    ApiKeySourceType: HEADER
    Description: An API Gateway with a sagemaker Integration
    EndpointConfiguration:
      Types:
        - EDGE
    Name: Rsage-api

ApiGatewayResource:
  Type: AWS::ApiGateway::Resource
  Properties:
    ParentId: !GetAtt ApiGatewayRestApi.RootResourceId
    PathPart: 'sagemaker'
    RestApiId: !Ref ApiGatewayRestApi

ApiGatewayMethod:
  Type: AWS::ApiGateway::Method
  Properties:
    ApiKeyRequired: false
    AuthorizationType: NONE
    HttpMethod: POST
    Integration:
      ConnectionType: INTERNET
      #Credentials: !GetAtt ApiGatewayIamRole.Arn
      IntegrationHttpMethod: POST
      PassthroughBehavior: WHEN_NO_MATCH
      TimeoutInMillis: 29000
      Type: AWS
      Uri: !Sub "arn:aws:apigateway:${self:provider.region}:runtime.sagemaker:path/endpoints/xgboost-2022-03-08-08-31-11-865/invocations"
    OperationName: 'lambda'
    ResourceId: !Ref ApiGatewayResource
    RestApiId: !Ref ApiGatewayRestApi

ApiGatewayModel:
  Type: AWS::ApiGateway::Model
  Properties:
    ContentType: 'application/json'
    RestApiId: !Ref ApiGatewayRestApi
    Schema: { }

ApiGatewayStage:
  Type: AWS::ApiGateway::Stage
  Properties:
    DeploymentId: !Ref ApiGatewayDeployment
    Description: Lambda API Stage v0
    RestApiId: !Ref ApiGatewayRestApi
    StageName: 'v0'

ApiGatewayDeployment:
  Type: AWS::ApiGateway::Deployment
  DependsOn: ApiGatewayMethod
  Properties:
    Description: RSage API Deployment
Ngôn ngữ chính
JavaScript
Star
11.5k
Fork
4.4k
Merge trung bình
2 giờ 55 phút
Pull request đã merge (30 ngày)
3

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của serverless/examples

Tất cả issue của serverless/examples

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.