Moto
awslogs
Our great sponsors
Moto | awslogs | |
---|---|---|
32 | 8 | |
7,374 | 4,749 | |
1.2% | - | |
9.9 | 0.0 | |
5 days ago | 21 days ago | |
Python | Python | |
Apache License 2.0 | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Moto
-
OpenTF Announces Fork of Terraform
> OpenMoto
I dunno if you're trying to play on "hashimoto" but https://github.com/getmoto/moto#readme would be a prime name collision for any such "OpenMoto" name
But yes, please, to adopting Vault. I don't have a horse in the race about Consul but my suspicion is such an effort would only be worthwhile if trying to adopt Nomad, too, which I gravely doubt
-
Class Credentials does not exist
Unfortunately I do not believe AWS provides any "test" gateways. I do know there are mock AWS servers you can run on your own. The one I use is called Moto. It does not cover everything (unfortunately it's the most comprehensive out there AFAIK), but it's decent enough to test most standard calls via the sdk. I'm not sure if it covers authorization though...we tend to use security roles on tasks for authorization.
-
What is the development enviroment for AWS?
If using Python use Moto to mock AWS Services
-
Unit testing Athena ETL?
You can use a library such as moto https://github.com/getmoto/moto
- Looking for resources for building unit testing for boto3 code and mocking AWS services in pytest
-
Guide to AWS Serverless & Lambda Testing Best Practices — Part 1
The Pythonic motto library mocks AWS services, removing the need to deploy your application or pay for API calls against AWS services. Other programming languages have their motto implementation.
-
Mock AWS Services on Docker
Has anyone managed to configure moto (https://docs.getmoto.org/en/latest/) in a docker container in the similar way LocalStack does?
-
Unit Testing an Airflow Dag
As for mocking, you can take a look at the moto library for mocking the AWS SDK, or for more simple cases even just use a `unittest.Mock/MagicMock` object. If you're having trouble trying to use the mocks in your code, it's a good sign your code is too highly coupled and it'd pay to re-factor, for example using dependency injection, design patterns like adapter/facade etc. (but don't over-do it)
- Final FLiP Stack Weekly of 2022
-
Do unit tests make sense here?
To add on to the integration tests point, for mocking out your AWS resources you should check out moto if you don't want run your test against real AWS resources as they may cost you and is usually slower.
awslogs
-
Logging in Python Like a Pro
Using the official CLI (aws logs get-log-events) or https://github.com/jorgebastida/awslogs is pretty close to SSH-ing and grepping.
- Tail log groups with CW Logs Insights?
-
I use cw, which is OSS to tail AWS CloudWatch Logs
cw is a native executable targeting your OS, and not needed external dependencies such as pip and npm. Compared to awslogs which is famous helpful tool for CloudWatch Logs1, cw is written in golang and faster.
-
What are you using to analyze/visualize CloudFront logs?
Its a command line tool but some people I know also use awslogs
-
Ask HN: Does anyone else find the AWS Lambda developer experience poor?
Not a full solution, but when I was doing this I really got to love the awslogs utility:
https://github.com/jorgebastida/awslogs
It allows you to stream Cloudwatch logs from the command line, so you can grep them, save them to files, etc... (The web based Cloudwatch interface is terrible.)
Another suggestion is to try to modularize the core business logic in your lambda such that you separate the lambda-centric stuff from the rest of it. Obviously, though, if "the rest of it" is hitting other AWS services, you're going to hit the same testing roadblock.
Or you can try mocking, which may or may not provide much value for you. There's a python library for that, (moto), but it's not 100% up to date wrt AWS services/interfaces, last I had checked. Might be worth a try though.
https://github.com/spulec/moto
-
Datadog alternatives
Cloudwatch Logs is pretty meh visually, but awslogs can give you a pretty good `tail -f`-like experience, and Insights is pretty good. Cloudwatch Metric Filters give you a 'StatsD'-like experience, in that you can log out a certain message or code and then use its appearance as a metric.
-
Cloud watch logs from console always show tail. How to show head without having to click ‘show more’ over and over again?
Check out https://github.com/jorgebastida/awslogs , you can define a `--start`, and it also has a `--watch`, and can be piped the `grep` or whatever you want. It's a pretty flexible tool.
-
DevOps tools you should have on your belt
📖 awslogs - a simple command-line tool for querying groups, streams, and events from Amazon CloudWatch logs.
What are some alternatives?
LocalStack - 💻 A fully functional local AWS cloud stack. Develop and test your cloud & Serverless apps offline
Loguru - Python logging made (stupidly) simple
aws-sdk-go - AWS SDK for the Go programming language.
cw - The best way to tail AWS CloudWatch Logs from your terminal
aws-cdk-local - Thin wrapper script for using the AWS CDK CLI with LocalStack
GoAccess - GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
VCR.py - Automatically mock your HTTP interactions to simplify and speed up testing
serverless-offline - Emulate AWS λ and API Gateway locally when developing your Serverless project
responses - A utility for mocking out the Python Requests library.
aws-codebuild-docker-images - Official AWS CodeBuild repository for managed Docker images http://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref.html
freezegun - Let your Python tests travel through time
faasd - A lightweight & portable faas engine