https://github.com/mooyoul/cloudwatch-logs-actions
Integrates Github Actions with AWS CloudWatch Logs
https://github.com/mooyoul/cloudwatch-logs-actions
aws cloudwatch-logs cwlogs github-actions
Last synced: 5 months ago
JSON representation
Integrates Github Actions with AWS CloudWatch Logs
- Host: GitHub
- URL: https://github.com/mooyoul/cloudwatch-logs-actions
- Owner: mooyoul
- License: mit
- Created: 2020-06-23T22:43:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-04-25T00:41:44.000Z (6 months ago)
- Last Synced: 2025-04-25T01:32:38.050Z (6 months ago)
- Topics: aws, cloudwatch-logs, cwlogs, github-actions
- Language: TypeScript
- Homepage:
- Size: 4 MB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# cloudwatch-logs-actions
[](https://github.com/mooyoul/cloudwatch-logs-actions/actions)
[](https://github.com/mooyoul/cloudwatch-logs-actions/actions)
[](https://github.com/semantic-release/semantic-release)
[](https://renovatebot.com/)
[](http://mooyoul.mit-license.org/)GitHub action that integrates with Amazon CloudWatch Logs.

-----
## Why?
I have an open sourced Backend Project, and I want to hide
deploy log to prevent sensitive information leak.... but currently, There are no way to hide logs of Github Actions.
So, My idea is - forward stdout/stderr output to CloudWatch Logs without printing logs.See below example for further details.
##### Example
```yaml
# ...
jobs:
job:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Deploy
uses: mooyoul/cloudwatch-logs-actions@v1.1.5
env:
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
group: my-open-project
stream: ${{ gihub.sha }}
retention: 14
run: |
# you can use multiline commands if needed
npm run deploy:stage
npm run deploy:prod
```##### Input
```typescript
type Input = {
// Cloudwatch Logs Region
region: string;// Name of Log Group
group: string;// Name of Log Stream
stream: string;// The number of days to retain the log events in the specified log group.
// Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.
retention?: string;
// Which shell to use
// Possible values are: sh, bash (default: sh)
shell?: string;// Command to run, Supports multiple commands
run: string;
}
```##### Output
None
## License
[MIT](LICENSE)
See full license on [mooyoul.mit-license.org](http://mooyoul.mit-license.org/)