Various fixes

Remove file-based env vars
Add support for session credentials
Add account ID as an output
Remove testing actions workflow
This commit is contained in:
Clare Liguori
2019-11-01 20:35:42 -07:00
parent 8ec2a2c672
commit 3aa1c0e14d
11 changed files with 33001 additions and 671 deletions
+11 -7
View File
@@ -1,10 +1,6 @@
## "Configure AWS Credentials" Action For GitHub Actions
Configure AWS credential environment variables for use in other GitHub Actions.
<a href="https://github.com/aws/configure-aws-credentials-for-github-actions"><img alt="GitHub Actions status" src="https://github.com/aws/configure-aws-credentials-for-github-actions/workflows/test-local/badge.svg"></a>
This action adds configuration required by [the AWS CLI](https://aws.amazon.com/cli/) for use in subsequent actions.
Configure AWS credential and region environment variables for use in other GitHub Actions. The environment variables will be detected by both the AWS SDKs and the AWS CLI to determine the credentials and region to use for AWS API calls.
## Usage
@@ -16,10 +12,18 @@ Add the following step to your workflow:
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-default-region: us-east-2
aws-default-output: json
aws-region: us-east-2
```
## Credentials
We recommend following [Amazon IAM best practices](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) for the AWS credentials used in GitHub Actions workflows, including:
* Do not store credentials in your repository's code. You may use [GitHub Actions secrets](https://help.github.com/en/github/automating-your-workflow-with-github-actions/virtual-environments-for-github-actions#creating-and-using-secrets-encrypted-variables) to store credentials and redact credentials from GitHub Actions workflow logs.
* [Create an individual IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users) with an access key for use in GitHub Actions workflows, preferably one per repository. Do not use the AWS account root user access key.
* [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege) to the credentials used in GitHub Actions workflows. Grant only the permissions required to perform the actions in your GitHub Actions workflows.
* [Rotate the credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#rotate-credentials) used in GitHub Actions workflows regularly.
* [Monitor the activity](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#keep-a-log) of the credentials used in GitHub Actions workflows.
## License Summary
This code is made available under the MIT license.