Welcome to the AWS Service Authentication Tool, a cross-platform CLI tool for managing AWS CodeArtifact and ECR authentication tokens. This tool simplifies the process of logging into AWS services and managing authentication credentials.
- Authenticate AWS CodeArtifact repositories.
- Authenticate Docker with AWS ECR.
- Cross-platform compatibility (Windows, macOS, and Linux).
- Detailed logging for auditing and debugging.
To install the AWS Service Authentication Tool as a global .NET tool, run:
dotnet tool install --global awsat
Run the tool with the desired command:
awsat --command nuget --region us-east-1 --logFolderPath ./logs
nuget
: Refreshes authentication tokens for AWS CodeArtifact.ecr
: Refreshes authentication tokens for AWS ECR.
Option | Description | Required |
---|---|---|
-c, --command |
Command to execute (nuget or ecr ). |
Yes |
-r, --region |
AWS region to use (e.g., us-east-1 ). |
Yes |
-l, --logFolderPath |
Path to the log file. | Yes |
-d, --debugMode |
Enable debug mode for detailed logging. | No |
-
Authenticate AWS CodeArtifact:
awsat --command nuget --region us-east-1 --logFolderPath ./logs
-
Authenticate AWS ECR:
awsat --command ecr --region us-east-1 --logFolderPath ./logs
To automate token refreshing, integrate this tool with your system's task scheduler.
-
Open your crontab configuration:
crontab -e
-
Add the following line to refresh tokens at startup:
@reboot awsat --command nuget --region us-east-1 --logFolderPath /path/to/logs
-
Open Task Scheduler and create a new task.
-
Set the trigger to run at login.
-
Set the action to execute:
awsat --command nuget --region us-east-1 --logFolderPath C:\path\to\logs
- AWS CLI: Installed and configured with valid credentials. Refer to the AWS CLI Configuration Guide.
- Docker: Installed for ECR authentication. Refer to Docker Installation Guide.
If you find this project useful, please consider supporting its development. Donations are appreciated and help maintain and improve this tool.
PayPal: mails.karimzouine@gmail.com
Detailed build and development instructions are now in the DEVELOPMENT.md file.
This project is licensed under the MIT License. See the LICENSE file for details.