Giter Site home page Giter Site logo

@mock_sqs interfering with acm client about moto HOT 5 CLOSED

jhw avatar jhw commented on June 7, 2024
@mock_sqs interfering with acm client

from moto.

Comments (5)

bblommers avatar bblommers commented on June 7, 2024 1

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.

mikeyjarvis19 avatar mikeyjarvis19 commented on June 7, 2024 1

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?

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.

bblommers avatar bblommers commented on June 7, 2024

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.

jhw avatar jhw commented on June 7, 2024

OK noted. Thank you.

from moto.

jhw avatar jhw commented on June 7, 2024

from moto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.