首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >圆ci云模板aws区域错误

圆ci云模板aws区域错误
EN

Stack Overflow用户
提问于 2021-02-22 06:03:02
回答 1查看 171关注 0票数 2

我有下面的循环词模板,我使用从一个教程。

代码语言:javascript
复制
jobs:
  create_infrastructure:
    docker:
      - image: amazon/aws-cli
    steps:
      - checkout
      - run:
          name: Ensure backend infrastructure exist
          command: |
            aws cloudformation deploy \
              --template-file template.yml \
              --stack-name my-stack
workflows:
  my_workflow:
    jobs:
      - create_infrastructure

但是当我在循环中执行时,我得到了

代码语言:javascript
复制
You must specify a region. You can also configure your region by running "aws configure".

Exited with code exit status 253

请帮我排除疑难。

还尝试将env vars添加到圆形区域,如截图中所示。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-02-22 06:25:18

正如错误信息所暗示的那样。您需要将区域添加到配置中:

代码语言:javascript
复制
jobs:
  create_infrastructure:
    docker:
      - image: amazon/aws-cli
    steps:
      - checkout
      - run:
          name: Ensure backend infrastructure exist
          command: |
            aws cloudformation deploy \
              --template-file template.yml \
              --stack-name my-stack \
              --region <your-region, e.g. us-east-1>
workflows:
  my_workflow:
    jobs:
      - create_infrastructure

更新

在一行(而不是多行)中使用命令是解决方案:

代码语言:javascript
复制
aws cloudformation deploy --template-file template.yml --stack-name my-stack --region eu-central-1
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66310734

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档