Comments (5)
Hi @jhw , we've just created a new alpha-release where this is now possible: moto==5.0.0alpha2
The new mock_aws
-decorator has a new config
-parameter which allows you to specify which services should passthrough to AWS:
@mock_aws(
config={"core": {
"mock_credentials": False,
"passthrough": {
"services": ["acm"]
}}}
)
See the release announcement here: #7198
Are you able to upgrade and verify that this works for you?
from moto.
Hi @jhw , we've just created a new alpha-release where this is now possible:
moto==5.0.0alpha2
The new
mock_aws
-decorator has a newconfig
-parameter which allows you to specify which services should passthrough to AWS:@mock_aws( config={"core": { "mock_credentials": False, "passthrough": { "services": ["acm"] }}} )
See the release announcement here: #7198
Are you able to upgrade and verify that this works for you?
This new config option in the 5.0 release was exactly what I needed, and solved the issue I was having when hitting SSM after mocking out SQS. Thank you!
from moto.
Hi @jhw,
that is the expected behaviour. Every decorator mocks the AWS credentials for security purposes, to ensure the test doesn't accidentally reach out to AWS.
If you want to mock both ACM and SQS, you can add both decorators.
@mock_acm
@mock_sqs
class HelloTest():
...
If you want to only mock a single service, and allow AWS access to another service, that is currently not supported.
#4597 is a feature request to configure this.
#3111 has a workaround that might work though.
from moto.
OK noted. Thank you.
from moto.
from moto.
Related Issues (20)
- Unit tests for boto3 client('bedrock-runtime') HOT 1
- ELBV2 describe_target_health on deregistered target should return a state of "unused" instead of "unavailable" HOT 2
- DynamoDB: Need methods to put/get/delete policy on table
- iot-data: shadow state delta is backward
- events.create_connection does not create secret HOT 1
- Unable to easily mock Athena result CSV HOT 3
- Feature - Add basic support for Network Manager. Global and Core Networks HOT 1
- S3: Configure the MaxKeys limit (list_objects/list_objects_v2) using an env variable
- Cognito-Idp: I see 'code_delivery_details' is nil when signingUp.
- IAM - create_policy returns bad tags HOT 1
- DynamoDB query with GSI doesn't return LastEvaluatedKey when paging moto 5.0.4 and later HOT 3
- No validationError raised on multiple "SET" operators in UpdateExpression HOT 1
- Infinite recursion error with moto 5.0.8 HOT 4
- RDS Clusters: Setting default values HOT 1
- EC2 DescribeRouteTables filter 'route.transit-gateway-id' not implemented HOT 3
- Error when I try to use scaffolding to create shield HOT 3
- Unable to create rds cluster HOT 1
- SSM.Client.get_parameter() by ARN instead of Name fails with ParameterNotFound
- DynamoDB Table query GSI with ExclusiveStartKey missing the primary key does not raise a ClientError
- EventBridge targets are not identified by moto when parsing cloudformation file.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moto.