-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@mock_sqs interfering with acm client #7169
Comments
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.
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. |
OK noted. Thank you. |
Hi @jhw , we've just created a new alpha-release where this is now possible: The new
See the release announcement here: #7198 Are you able to upgrade and verify that this works for you? |
Ah I ended up using some kind of workaround, I can't remember what. It
wasn't a problem in the end. I will try and have a look at the alpha this
week and let you know. Thank you for the update :)
…On Sun, 14 Jan 2024 at 21:20, Bert Blommers ***@***.***> wrote:
Hi @jhw <https://github.com/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
<#7198>
Are you able to upgrade and verify that this works for you?
—
Reply to this email directly, view it on GitHub
<#7169 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACFFDXJLO7PK2QDCJ6F73YORDZXAVCNFSM6AAAAABBIAXH7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJRGA3TKNBQGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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! |
Hello
I have the following script (dev/list_certificates2.py)
If I run it as per above I get the following -
But if I uncomment
@mock_sqs
I get the following -??? @mock_sqs is interfering with acm ??
Running moto 4.2.10
Thank you
The text was updated successfully, but these errors were encountered: