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
- Checking the deploy role for right permissions
- Checking the STS token - it is active
- 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 atus-east-1
deploy correctly and update correctly