beanstalk-deploy: Deployment failed: Error: Status: 403. Message: Node run failed with exit code 2
I’m having troubles getting beanstalk-deploy
to work inside my GitHub Actions, keep getting 403
error.
Run einaregilsson/beanstalk-deploy@v1
with:
aws_access_key: ABC123
aws_secret_key: XYZ789
application_name: our-beanstalk-app
environment_name: our-beanstalk-app-env
region: ca-central-1
version_label: 8
deployment_package: deploy.zip
env:
CI: true
AWS_ACCESS_KEY_ID: ABC123
AWS_SECRET_ACCESS_KEY: XYZ789
Uploading file to bucket elasticbeanstalk-ca-central-1-302080953439
##[error]Deployment failed: Error: Status: 403. Message:
##[error]Node run failed with exit code 2
I installed the package locally and able to successfully run it from the command line:
AWS_ACCESS_KEY_ID=ABC123 AWS_SECRET_ACCESS_KEY=XYZ789 beanstalk-deploy our-beanstalk-app our-beanstalk-app-env 8 ca-central-1 deploy.zip
Any ideas why it’s working from the command line but not via GitHub Actions?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18
Commits related to this issue
- Merge pull request #1 from rewindio/feature/do-not-fail-on-version-already-exists Do not fail on versionAlreadyExists if !environmentName — committed to einaregilsson/beanstalk-deploy by phamtriduy 3 years ago
I also got 403 errors when I used
$GITHUB_RUN_ID
I changed it to
${{ github.run_id }}
and it worked correctly.I noticed a similar problem when I was using a env var
$AWS_REGION
for theregion
key, and that also worked when I changed to use the context syntax:${{ env.AWS_REGION }}
.@varl Ah ok I understand. Of course, it makes sense. Can’t use $ENVVAR syntax in parameter values, since that’s not bash, only in strings that are evaluated in the bash shell, e.g. anywhere in a
- run: some comand that goes to bash $ENVVAR
. In parameter values you must use${{ env.VAR_NAME }}
syntax.Good to know. People read these issues, so good to have this info here 🙂