0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

お題は不問!Qiita Engineer Festa 2024で記事投稿!
Qiita Engineer Festa20242024年7月17日まで開催中!

Serverless Framework 特に設定せずデプロイしたらバージニア北部のlambdaにデプロイされた

Posted at

概要

下記の方法で新規のプロジェクトを作成し、$ serverless deployを実行したところバージニア北部のリージョンでlambdaの関数が作成された。
東京リージョンにデプロイするように設定する方法をまとめる。

前提

下記の内容が完了していること。

方法

  • serverless.ymlを開き、providerにregionを追加し、東京リージョンを設定

    serverless.yml
    # "org" ensures this Service is used with the correct Serverless Framework Access Key.
    org: shun0104
    # "app" enables Serverless Framework Dashboard features and sharing them with other Services.
    app: test-serverless
    # "service" is the name of this project. This will also be added to your AWS resource names.
    service: test-project
    
    provider:
      name: aws
      runtime: nodejs20.x
      region: ap-northeast-1
    
    functions:
      hello:
        handler: handler.hello
        events:
          - httpApi:
              path: /
              method: get
    
  • 下記を実行してデプロイ

    serverless deploy
    
  • 下記のように出たのでおそらく東京リージョンのデプロイできているはず

    Deploying "test-project" to stage "dev" (ap-northeast-1)
    
    ✔ Service deployed to stack test-project-dev (97s)
    
  • 念の為確認したらちゃんと東京リージョンにデプロイされていた

    CleanShot 2024-07-15 at 13.35.40@2x.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?