国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

這篇具有很好參考價值的文章主要介紹了【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

?一、背景

在不給AK,SK的前提下,用戶查看s3上文件(從s3下載文件)

二、創(chuàng)建API

1、打開API Gateway,點擊創(chuàng)建API,選擇REST API

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

REST API和HTTP API區(qū)別:(來自AWS官網(wǎng))

REST API 和 HTTP API 都是 RESTful API 產(chǎn)品。REST API 支持的功能比 HTTP API 多,而 HTTP API 在設計時功能就極少,因此能夠以更低的價格提供。如果您需要如 API 密鑰、每客戶端節(jié)流、請求驗證、AWS WAF 集成或私有 API 端點等功能,請選擇 REST API。如果您不需要 REST API 中包含的功能,請選擇 HTTP API。

2、 設置API名稱,選擇終端節(jié)點類型

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

終端節(jié)點類型:(來自AWS官網(wǎng))

????????區(qū)域性(REGIONAL):適用于同一區(qū)域中的客戶端。當在 EC2 實例上運行的客戶端調(diào)用同一區(qū)域中的 API,或 API 用于為具有高需求的少數(shù)客戶端提供服務時,區(qū)域 API 可以降低連接開銷。

????????還有邊緣優(yōu)化(EDGE):最適合地理位置分散的客戶端。API 請求將路由到最近的 CloudFront 接入點 (POP)。這是 API Gateway REST API 的默認終端節(jié)點類型。

????????私有(PRIVATE):是一個只能使用接口 VPC 終端節(jié)點從 Amazon Virtual Private Cloud (VPC) 訪問的 API 終端節(jié)點,該接口是您在 VPC 中創(chuàng)建的終端節(jié)點網(wǎng)絡接口 (ENI)

?三、配置API

1、進入剛創(chuàng)建好的API,點擊資源頁,創(chuàng)建資源及方法

1.1創(chuàng)建資源,?/ 代表根目錄,右擊選擇創(chuàng)建資源

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

?1.2創(chuàng)建方法,上傳文件到s3,所以選擇GET方法

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

1.3點擊剛創(chuàng)建的方法,進入集成請求

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

?1.3配置:

集成類型:AWS 服務

AWS區(qū)域:(選擇相應的區(qū)域)

AWS服務:S3

AWS子域:(不用填)

HTTP方法:GET

操作類型:路徑覆蓋

路徑覆蓋(可選):{bucket}/{object}

執(zhí)行角色:(填寫有執(zhí)行API角色的ARN)

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

?路徑覆蓋也可以把路徑某部分hard code

?在下方URL路徑參數(shù)中填寫路徑參數(shù)映射關(guān)系

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

2、配置設置

翻到最下面,修改二進制媒體類型為 ??*/*

Content-Encoding可以根據(jù)需要修改

默認上傳文件大小不超過10M

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

三、添加授權(quán)方

?1、新建Lambda函數(shù),來驗證授權(quán)方,運行時選擇 Node.js 16.x

代碼如下:當header中account和password匹配上,則allow,否則deny

exports.handler = function(event, context, callback) {        
    console.log('Received event:', JSON.stringify(event, null, 2));

    // A simple request-based authorizer example to demonstrate how to use request 
    // parameters to allow or deny a request. In this example, a request is  
    // authorized if the client-supplied headerauth1 header, QueryString1
    // query parameter, and stage variable of StageVar1 all match
    // specified values of 'headerValue1', 'queryValue1', and 'stageValue1',
    // respectively.

    // Retrieve request parameters from the Lambda function input:
    var headers = event.headers;
    var queryStringParameters = event.queryStringParameters;
    var pathParameters = event.pathParameters;
    var stageVariables = event.stageVariables;
        
    // Parse the input for the parameter values
    var tmp = event.methodArn.split(':');
    var apiGatewayArnTmp = tmp[5].split('/');
    var awsAccountId = tmp[4];
    var region = tmp[3];
    var restApiId = apiGatewayArnTmp[0];
    var stage = apiGatewayArnTmp[1];
    var method = apiGatewayArnTmp[2];
    var resource = '/'; // root resource
    if (apiGatewayArnTmp[3]) {
        resource += apiGatewayArnTmp[3];
    }
        
    // Perform authorization to return the Allow policy for correct parameters and 
    // the 'Unauthorized' error, otherwise.
    var authResponse = {};
    var condition = {};
    condition.IpAddress = {};
     
    if (headers.account === ""
        && headers.password === "") {
        callback(null, generateAllow('me', event.methodArn));
    }else {
        callback("Unauthorized");
    }
}
     
// Help function to generate an IAM policy
var generatePolicy = function(principalId, effect, resource) {
    // Required output:
    var authResponse = {};
    authResponse.principalId = principalId;
    if (effect && resource) {
        var policyDocument = {};
        policyDocument.Version = '2012-10-17'; // default version
        policyDocument.Statement = [];
        var statementOne = {};
        statementOne.Action = 'execute-api:Invoke'; // default action
        statementOne.Effect = effect;
        statementOne.Resource = resource;
        policyDocument.Statement[0] = statementOne;
        authResponse.policyDocument = policyDocument;
    }
    // Optional output with custom properties of the String, Number or Boolean type.
    authResponse.context = {
        "account": '',
        "password": '',
        "booleanKey": true
    };
    return authResponse;
}
     
var generateAllow = function(principalId, resource) {
    return generatePolicy(principalId, 'Allow', resource);
}
     
var generateDeny = function(principalId, resource) {
    return generatePolicy(principalId, 'Deny', resource);
}

2、創(chuàng)建授權(quán)方

授權(quán)方名稱

類型:選擇Lambda

Lambda函數(shù):填寫剛創(chuàng)建好的Lambda函數(shù)名稱

Lambda調(diào)用角色:填寫調(diào)用Lambda函數(shù)的角色

Lambda事件負載:選擇請求

身份來源:選擇標頭,添加account和password

授權(quán)緩存:取消啟用

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

?三、配置授權(quán)方

選擇 添加授權(quán)方的路徑資源方法中的方法請求

?

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

授權(quán)選擇配置好的授權(quán)方名稱

請求驗證程序:無

需要API密鑰:否

HTTP請求標頭:將account和password配置進來

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

四、部署API

?API配置完成后,右擊根目錄,部署API,?選擇部署階段,點擊部署

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

注意:每次對API進行更改后要重新部署一下

五、測試API?

?測試通過兩種方式:①Postman????????②python代碼

獲取URL鏈接

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

1、Postman

進入Postman,添加PUT請求,復制URL鏈接,在其后添加要下載文件的S3的路徑,點擊send,即可在下方看到請求結(jié)果

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件

?

2、python代碼

import json
import requests

def call_get_api(_url,_headers):
    res = requests.get(url=_url, headers=_headers)
    return res

def download_s3(bucket,key,local_file):
    # api gateway call url
    url_ip = ""
    # generate the url
    url = url_ip + bucket + key

    # headers
    headers = {"account": "", "password": ""}

    # call the api2s3 method
    res = call_get_api(url, headers)
    res.encoding = 'utf-8'
    data = res.text
    if res.status_code == 200:
        print(res.status_code)
        print(data)
        with open(local_file, 'wb') as f:
            # str通過encode()方法可以轉(zhuǎn)換為bytes
            f.write(data.encode())
    else:
        print(res)

if __name__ == '__main__':
    # s3 file
    bucket = ''
    key = ''

    # local file name
    local_file = ''
    download_s3(bucket, key, local_file)


六、通過CloudFormation新建API

yaml文件代碼如下文章來源地址http://www.zghlxwxcb.cn/news/detail-512110.html

AWSTemplateFormatVersion: '2010-09-09'
Description : Template to provision ETL Workflow for api gateway 
Parameters:
  Region:
    Description: 'Specify the Region for resource.'
    Type: String
    Default: ase1
  Iteration:
    Type: String
    Description: 'Specify the Iteration for Lambda.'
    Default: '001'
  S3Iteration:
    Type: String
    Description: 'Specify the Iteration for S3'
    Default: '001'
  IAMIteration:
    Type: String
    Description: 'Specify the Iteration for IAM roles.'
    Default: '001'

Resources: 
  ApigatewayRestAPI:
    Type: AWS::ApiGateway::RestApi
    Properties:
      Name: api-downloads3-${Iteration}
      BinaryMediaTypes:
        - "*/*"
      Description: create api to download file from s3
      Mode: overwrite
      EndpointConfiguration:
        Types:
          - REGIONAL
 
  ApigatewayAuthorizer:
    Type: AWS::ApiGateway::Authorizer
    Properties:
      AuthorizerCredentials: "arn:aws:iam::${AWS::AccountId}:role/iamr-replication-${IAMIteration}"
      AuthorizerResultTtlInSeconds : 0
      AuthorizerUri: "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:lamb-apigw-authorizer-${S3Iteration}/invocations"
      Type : REQUEST
      AuthType: custom
      RestApiId: 
        !Ref  ApigatewayRestAPI
      Name: auth-request
      IdentitySource : method.request.header.account,method.request.header.password

  ApigatewayResourceFolder:
    Type: AWS::ApiGateway::Resource
    Properties:
      RestApiId: 
        !Ref ApigatewayRestAPI
      PathPart: "{folder}"
      ParentId: !GetAtt 
        - ApigatewayRestAPI
        - RootResourceId

  ApigatewayMethodFolder:
    Type: AWS::ApiGateway::Method
    Properties:
      AuthorizerId:
        !Ref ApigatewayAuthorizer
      AuthorizationType: custom
      RequestParameters: {
        "method.request.path.folder": true,
        "method.request.header.account": true,
        "method.request.header.password": true
      }
      HttpMethod: GET
      MethodResponses:
        - StatusCode: 200
          ResponseModels: 
            application/json: Empty
      RestApiId:
        !Ref ApigatewayRestAPI
      ResourceId: !GetAtt 
        - ApigatewayResourceFolder
        - ResourceId 
      Integration:
        Type: AWS
        Credentials: "arn:aws:iam::${AWS::AccountId}:role/iamr-replication-${IAMIteration}"
        IntegrationHttpMethod: GET
        IntegrationResponses:
          - StatusCode: 200
        PassthroughBehavior: when_no_match
        Uri: "arn:aws:apigateway:${AWS::Region}:s3:path/{folder}"
        RequestParameters: {
            "integration.request.path.folder" : "method.request.path.folder"
          }

  ApigatewayResourceTablename:
    Type: AWS::ApiGateway::Resource
    Properties:
      RestApiId: 
        !Ref ApigatewayRestAPI
      PathPart: "{tablename}"
      ParentId:
        !Ref ApigatewayResourceFolder

  ApigatewayMethodTablename:
    Type: AWS::ApiGateway::Method
    Properties:
      AuthorizerId:
        !Ref ApigatewayAuthorizer
      AuthorizationType: custom
      RequestParameters: {
        "method.request.path.folder": true,
        "method.request.path.tablename": true,
        "method.request.header.account": true,
        "method.request.header.password": true
      }
      HttpMethod: GET
      MethodResponses:
        - StatusCode: 200
          ResponseModels: 
            application/json: Empty
      RestApiId:
        !Ref ApigatewayRestAPI
      ResourceId: !GetAtt 
        - ApigatewayResourceTablename
        - ResourceId 
      Integration:
        Type: AWS
        Credentials: "arn:aws:iam::${AWS::AccountId}:role/iamr-replication-${IAMIteration}"
        IntegrationHttpMethod: GET
        IntegrationResponses:
          - StatusCode: 200
        PassthroughBehavior: when_no_match
        Uri: "arn:aws:apigateway:${AWS::Region}:s3:path/{folder}/{tablename}"
        RequestParameters: {
            "integration.request.path.folder" : "method.request.path.folder",
            "integration.request.path.tablename" : "method.request.path.tablename"
          }


  ApigatewayResourcePartition:
    Type: AWS::ApiGateway::Resource
    Properties:
      RestApiId:
        !Ref ApigatewayRestAPI
      PathPart: "{partition}"
      ParentId:
        !Ref ApigatewayResourceTablename

  ApigatewayMethodPartition:
    Type: AWS::ApiGateway::Method
    Properties:
      AuthorizerId:
        !Ref ApigatewayAuthorizer
      AuthorizationType: custom
      RequestParameters: {
        "method.request.path.folder": true,
        "method.request.path.tablename": true,
        "method.request.path.partition": true,
        "method.request.header.account": true,
        "method.request.header.password": true
      }
      HttpMethod: GET
      MethodResponses:
        - StatusCode: 200
          ResponseModels: 
            application/json: Empty
      RestApiId:
        !Ref ApigatewayRestAPI
      ResourceId: !GetAtt 
        - ApigatewayResourcePartition
        - ResourceId 
      Integration:
        Type: AWS
        Credentials: "arn:aws:iam::${AWS::AccountId}:role/iamr-replication-${IAMIteration}"
        IntegrationHttpMethod: GET
        IntegrationResponses:
          - StatusCode: 200
        PassthroughBehavior: when_no_match
        Uri: "arn:aws:apigateway:${AWS::Region}:s3:path/{folder}/{tablename}/{partition}"
        RequestParameters: {
            "integration.request.path.partition" : "method.request.path.partition",
            "integration.request.path.folder" : "method.request.path.folder",
            "integration.request.path.tablename" : "method.request.path.tablename"
          }


  ApigatewayResourceFilename:
    Type: AWS::ApiGateway::Resource
    Properties:
      RestApiId: 
        !Ref ApigatewayRestAPI
      PathPart: "{filename}"
      ParentId:
        !Ref ApigatewayResourcePartition

  ApigatewayMethodFilename:
    Type: AWS::ApiGateway::Method
    Properties:
      AuthorizerId:
        !Ref ApigatewayAuthorizer
      AuthorizationType: custom
      RequestParameters: {
        "method.request.path.folder": true,
        "method.request.path.tablename": true,
        "method.request.path.partition": true,
        "method.request.path.filename": true,
        "method.request.header.account": true,
        "method.request.header.password": true
      }
      HttpMethod: GET
      MethodResponses:
        - StatusCode: 200
          ResponseModels: 
            application/json: Empty
      RestApiId:
        !Ref ApigatewayRestAPI
      ResourceId: !GetAtt 
        - ApigatewayResourceFilename
        - ResourceId 
      Integration:
        Type: AWS
        Credentials: "arn:aws:iam::${AWS::AccountId}:role/iamr-replication-${IAMIteration}"
        IntegrationHttpMethod: GET
        IntegrationResponses:
          - StatusCode: 200
        PassthroughBehavior: when_no_match
        Uri: "arn:aws:apigateway:${AWS::Region}:s3:path/{folder}/{tablename}/{partition}/{filename}"
        RequestParameters: {
            "integration.request.path.partition" : "method.request.path.partition",
            "integration.request.path.filename" : "method.request.path.filename",
            "integration.request.path.folder" : "method.request.path.folder",
            "integration.request.path.tablename" : "method.request.path.tablename"
          }
          
  ApigatewayDeploymentv1:
    DependsOn: ApigatewayMethodFilename
    Type: AWS::ApiGateway::Deployment
    Properties: 
      RestApiId:
        !Ref ApigatewayRestAPI
      StageName : v1

  PermissionToInvokeLambda: 
    Type: AWS::Lambda::Permission
    Properties: 
      FunctionName: lamb-apigw-authorizer-${Iteration}
      Action: "lambda:InvokeFunction"
      Principal: "apigateway.amazonaws.com"
      SourceArn: !Sub
        - "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${APiId}/authorizers/${AuthorizerId}"
        - APiId: 
            !Ref ApigatewayRestAPI
          AuthorizerId: 
            !Ref ApigatewayAuthorizer

Outputs:
  RootResourceId:
    Value: !GetAtt ApigatewayRestAPI.RootResourceId
  AuthorizerId:
    Value: !GetAtt ApigatewayAuthorizer.AuthorizerId

到了這里,關(guān)于【AWS】API Gateway創(chuàng)建Rest API--從S3下載文件的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權(quán),不承擔相關(guān)法律責任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務器費用

相關(guān)文章

  • 基于java的 aws s3文件上傳

    aws s3 文件上傳代碼 首先,確保您已經(jīng)在AWS上創(chuàng)建了一個S3存儲桶,并擁有相應的訪問密鑰和密鑰ID。這些憑據(jù)將用于在Java代碼中進行身份驗證。 接下來,需要在Java項目中添加AWS SDK的依賴??梢允褂肕aven或Gradle進行依賴管理。以下是一個Maven的示例依賴項: 示例代碼: 在上述

    2024年01月17日
    瀏覽(17)
  • 【Terraform學習】使用 Terraform創(chuàng)建 S3 存儲桶事件(Terraform-AWS最佳實戰(zhàn)學習)

    【Terraform學習】使用 Terraform創(chuàng)建 S3 存儲桶事件(Terraform-AWS最佳實戰(zhàn)學習)

    ??本站以分享各種運維經(jīng)驗和運維所需要的技能為主 《python》:python零基礎入門學習 《shell》:shell學習 《terraform》持續(xù)更新中:terraform_Aws學習零基礎入門到最佳實戰(zhàn) 《k8》暫未更新 《docker學習》暫未更新 《ceph學習》ceph日常問題解決分享 《日志收集》ELK+各種中間件 《運

    2024年02月10日
    瀏覽(19)
  • 使用AWS MVP方案[Data Transfer Hub]從Global S3同步文件到中國區(qū)S3

    使用AWS MVP方案[Data Transfer Hub]從Global S3同步文件到中國區(qū)S3

    本文主要描述在AWS Global區(qū)部署Data Transfer Hub方案,并創(chuàng)建從global S3同步文件到中國區(qū)S3的任務 ? 1.1 AWS Global賬號 需要一個AWS Global的賬號,并且有相應的權(quán)限,本例是Full Administrator權(quán)限 1.2 在AWS Global賬號下準備一個S3存儲桶 登陸AWS Global賬號,選擇 服務 - 存儲 - S3 ? 點擊創(chuàng)建

    2024年02月08日
    瀏覽(22)
  • [ 云計算 | AWS 實踐 ] Java 如何重命名 Amazon S3 中的文件和文件夾

    [ 云計算 | AWS 實踐 ] Java 如何重命名 Amazon S3 中的文件和文件夾

    本文收錄于【#云計算入門與實踐 - AWS】專欄中,收錄 AWS 入門與實踐相關(guān)博文。 本文同步于個人公眾號:【 云計算洞察 】 更多關(guān)于云計算技術(shù)內(nèi)容敬請關(guān)注:CSDN【#云計算入門與實踐 - AWS】專欄。 本系列已更新博文: [ 云計算 | AWS 實踐 ] Java 應用中使用 Amazon S3 進行存儲桶

    2024年02月08日
    瀏覽(33)
  • Jira REST API_獲取創(chuàng)建issue時的字段配置

    通過 Jira REST API 創(chuàng)建 jira issue 時,可以根據(jù)jira 配置,動態(tài)獲取需要填寫的字段;這樣就不用每次通過UI ,固定指定創(chuàng)建issue時需要填充的內(nèi)容,來實現(xiàn)接口創(chuàng)建 issue 了。 獲取創(chuàng)建項目的問題類型: 獲取指定問題類型創(chuàng)建時的字段配置 可以先獲取項目類型id,然后再在末尾傳

    2024年01月17日
    瀏覽(22)
  • 使用 API Gateway Integrator 在 Quarkus 中實施適用于 AWS Lambda 的 OpenAPI

    使用 API Gateway Integrator 在 Quarkus 中實施適用于 AWS Lambda 的 OpenAPI

    AWS API Gateway 集成使得使用符合 OpenAPI 標準的 Lambda Function 輕松實現(xiàn) REST API。 ????????它是一個 ? 允許以標準方式描述 REST API 的規(guī)范。 ? OpenAPI規(guī)范 (OAS) 為 REST API 定義了與編程語言無關(guān)的標準接口描述。這使得人類和計算機都可以發(fā)現(xiàn)和理解服務的功能,而無需訪問源代

    2024年02月13日
    瀏覽(40)
  • 如何使用Python Flask和MySQL創(chuàng)建管理用戶的REST API

    如何使用Python Flask和MySQL創(chuàng)建管理用戶的REST API

    部分數(shù)據(jù)來源: ChatGPT? 引言 ????????在現(xiàn)代化的應用開發(fā)中,數(shù)據(jù)庫是一個非常重要的組成部分。關(guān)系型數(shù)據(jù)庫(例如:MySQL、PostgreSQL)在這方面尤其是很流行。Flask是一個Python的web框架,非常適合實現(xiàn)REST API。在這篇文章中,我們將介紹如何使用Python Flask和MySQL創(chuàng)建一個

    2024年02月08日
    瀏覽(28)
  • Azure Machine Learning - 使用 REST API 創(chuàng)建 Azure AI 搜索索引

    Azure Machine Learning - 使用 REST API 創(chuàng)建 Azure AI 搜索索引

    本文介紹如何使用 Azure AI 搜索 REST AP和用于發(fā)送和接收請求的 REST 客戶端以交互方式構(gòu)建請求。 關(guān)注TechLead,分享AI全維度知識。作者擁有10+年互聯(lián)網(wǎng)服務架構(gòu)、AI產(chǎn)品研發(fā)經(jīng)驗、團隊管理經(jīng)驗,同濟本復旦碩,復旦機器人智能實驗室成員,阿里云認證的資深架構(gòu)師,項目管理

    2024年02月04日
    瀏覽(27)
  • 使用Java API對HDFS進行如下操作:文件的創(chuàng)建、上傳、下載以及刪除等操作

    使用Java API對HDFS進行如下操作:文件的創(chuàng)建、上傳、下載以及刪除等操作

    HDFS-JAVA接口:上傳文件 將一個本地文件(無具體要求)上傳至HDFS中的/hdfs-test路徑下(如無此路徑,新建一個)。 新建路徑: ? 首先在路徑/usr/test/ 下新建test.txt,指令為:/usr/test/test.txt,然后進行上傳操作。 ? ? ?2.HDFS-JAVA接口:創(chuàng)建文件 在HDFS中的/hdfs-test路徑下新建一個da

    2024年02月07日
    瀏覽(29)
  • AWS復制EC2文件到S3,g4dn.2xlarge沒有NVIDIA GPU 驅(qū)動問題

    AWS復制EC2文件到S3,g4dn.2xlarge沒有NVIDIA GPU 驅(qū)動問題

    1、給instances權(quán)限 action Security modify IAM role 把提前創(chuàng)建好的role給這個instance即可 2、復制到bucket 如果要自己安裝,參考https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-nvidia-driver.html#public-nvidia-driver 但實際上只需要選擇操作系統(tǒng)的時候選擇帶有GPU的就可以了,docker和python3也自動就

    2024年02月11日
    瀏覽(21)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包