How to create a flow service to get token from AWS Cloud

Thank you for your quick response NP,

I also read these:
Implementing OAuth using webMethods Integration Server - Knowledge base - Software AG Tech Community & Forums
Working with OAuth Type Authorization Code Grant and Implicit Grant - Knowledge base - webMethods - Software AG Tech Community & Forums

Those steps will only work when internal/external applications will invoke webMethods or the inbound to webMethods authentication and not when webMethods needs the token from internal/external application?