Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: AWS Error: CredentialsError: Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1 #139

Open
hungbang opened this issue Jul 5, 2021 · 0 comments

Comments

@hungbang
Copy link

hungbang commented Jul 5, 2021

Error detail:

INFO  Connection to S3 created.
 ERROR  Bucket: frontend-stg could not be validated.
 ERROR  Bucket: frontend-stg could not be created.
 ERROR  {}
Error: AWS Error: CredentialsError: Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1
    at Bucket._callee2$ (/home/runner/work/akaka-ui/akaka-ui/node_modules/vue-cli-plugin-s3-deploy/bucket.js:145:23)
    at tryCatch (/home/runner/work/teemo-ui/akaka-ui/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/home/runner/work/akaka-ui/teemo-ui/node_modules/regenerator-runtime/runtime.js:293:22)
    at Generator.throw (/home/runner/work/teemo-ui/akaka-ui/node_modules/regenerator-runtime/runtime.js:118:21)
    at asyncGeneratorStep (/home/runner/work/teemo-ui/akaka-ui/node_modules/vue-cli-plugin-s3-deploy/bucket.js:14:103)
    at _throw (/home/runner/work/akaka-ui/akaka-ui/node_modules/vue-cli-plugin-s3-deploy/bucket.js:16:291)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Below are the git action deploy script:

name: CI

env:
  AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
  AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

on:
  push:
    branches: [ staging ]
  pull_request:
    branches: [ staging ]
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Configure AWS credentials from stg and prd account
        uses: aws-actions/configure-aws-credentials@v1
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

      - name: Log information before deploying
        run: |
          echo "The Secret ID $AWS_ACCESS_KEY_ID"
          echo "The Secret Access Key $AWS_SECRET_ACCESS_KEY"
          echo "The AWS_ACCESS_KEY_ID ${{ secrets.AWS_ACCESS_KEY_ID }}"
          echo "The AWS_SECRET_ACCESS_KEY ${{ secrets.AWS_SECRET_ACCESS_KEY }}"

      - name: Run a multi-line script
        run: |
          printenv AWS_ACCESS_KEY_ID
          printenv AWS_SECRET_ACCESS_KEY

          yarn global add @vue/cli
          yarn add vue-cli-plugin-s3-deploy@next
          yarn install
          yarn build --mode staging
          yarn deploy --mode staging
        

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant