Getting error "Request is missing Authentication Token" on serverless deploy for af-south-1 region

2

We are using buildspec and serverless to deploy our lambdas to was. It was working fine till early morning India time. But in post build, started seeing the error "Request is missing Authentication Token".

``

version: 0.2

phases:
   install:
      commands:
         - npm install -g serverless@3.13.0
   build:
      commands:
         - env="dev" && region="af-south-1"
         - echo $CODEBUILD_WEBHOOK_HEAD_REF
         - if [ "$CODEBUILD_WEBHOOK_HEAD_REF" = "refs/heads/main" ]; then env="prod"; elif [ "$CODEBUILD_WEBHOOK_HEAD_REF" = "refs/heads/uat" ]; then env="uat"; elif [ "$CODEBUILD_WEBHOOK_HEAD_REF" = "refs/heads/dev" ]; then env="dev"; fi
         - npm install
         - npm run build
         - rm -rf node_modules
         - npm install --production
   post_build:
      commands:
         - env="dev" && region="af-south-1"
         - echo $CODEBUILD_WEBHOOK_HEAD_REF

         - if [ "$CODEBUILD_WEBHOOK_HEAD_REF" = "refs/heads/main" ]; then env="prod"; elif [ "$CODEBUILD_WEBHOOK_HEAD_REF" = "refs/heads/uat" ]; then env="uat"; elif [ "$CODEBUILD_WEBHOOK_HEAD_REF" = "refs/heads/dev" ]; then env="dev"; region="af-south-1"; elif [ "$CODEBUILD_WEBHOOK_HEAD_REF" = "refs/heads/stage" ]; then env="stage"; fi
         - echo "deploying for env=$env region=$region"

         - serverless deploy --stage $env --region $region --verbose


Here's the error we are getting.

[Container] 2022/11/28 10:36:58 Running command serverless deploy --stage $env --region $region --verbose
To ensure safe major version upgrades ensure "frameworkVersion" setting in service configuration (recommended setup: "frameworkVersion: ^3.13.0")


Warning: Invalid configuration encountered
  at 'provider': unrecognized property 'package'

Learn more about configuration validation here: http://slss.io/configuration-validation

Deploying test-authorizer to stage dev (af-south-1)

Excluding development dependencies for service package

× Stack test-authorizer-dev failed to deploy (0s)

We tried to deploy on us-east-1, but it worked, it just stopped working for af-south-1

Checked the following already

  1. Checking the deploy role for right permissions
  2. Checking the STS token - it is active
  3. Also tried to change the deployment environment on codebuild. It didn't work
  • exactly same is happening to us: previously deployed lambda in us-east-2 doesn't update but newly created lambdas at us-east-1 deploy correctly and update correctly

1개 답변
0

If you are using aws-sdk-js library there was a change released that broke serverless deployments (yesterday) and you want to ensure you are not using the latest version. Downgrade to aws-sdk version to v2.1261.0. It worked for us...

Details here: https://github.com/aws/aws-sdk-js/issues/4286

Ransel
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠