Contents
What do I do if I inadvertently expose AWS Access Key?
What to Do If You Inadvertently Expose an AWS Access Key
- Determine what resources those credentials have access to.
- Invalidate the credentials so they can no longer be used to access your account.
- Consider invalidating any temporary security credentials that might have been issued using the credentials.
Where do I put AWS credentials?
Setting Credentials Set credentials in the AWS credentials profile file on your local system, located at: ~/. aws/credentials on Linux, macOS, or Unix. C:\Users\USERNAME\.
How do I add AWS credentials to GitHub actions?
3 Answers
- On GitHub, navigate to the main page of the repository.
- Under your repository name, click the ⚙ Settings tab.
- Repository settings button.
- In the left sidebar, click Secrets.
- Type a name for your secret in the “Name” input box.
- Type the value for your secret.
- Click Add secret.
Do AWS credentials expire?
Long-term access keys, such as those associated with IAM users and AWS account root users, remain valid until you manually revoke them. However, temporary security credentials obtained through IAM roles and other features of the AWS Security Token Service expire after a short period of time.
How long do AWS temporary credentials last?
By default, temporary security credentials for an IAM user are valid for a maximum of 12 hours. But you can request a duration as short as 15 minutes or as long as 36 hours using the DurationSeconds parameter. For security reasons, a token for an AWS account root user is restricted to a duration of one hour.
Do you use AWS root user access key for GitHub?
Do not use the AWS account root user access key. 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 used in GitHub Actions workflows regularly.
How to configure AWS credentials for GitHub 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. Add the following step to your workflow:
How to monitor the credentials used in GitHub actions?
Rotate the credentials used in GitHub Actions workflows regularly. Monitor the activity of the credentials used in GitHub Actions workflows. If you would like to use the static credentials you provide to this action to assume a role, you can do so by specifying the role ARN in role-to-assume .
What happens if I publish my AWS secret key?
This poses a security risk to your account and other users, could lead to excessive charges from unauthorized activity or abuse, and violates the AWS Customer Agreement. Please delete the exposed credentials from your AWS account by using the instructions below and take steps to prevent any new credentials from being published in this manner again.