@aligent/cdk-rabbitmq
v0.3.8
Published
 ;
class RabbitMQStack extends Stack {
constructor(scope: Construct, id: string, props: hostingStackProps) {
super(scope, id, props);
new RabbitMQ(scope, 'rabbitmq', props.rabbitMQProps);
}
}
new RabbitMQStack(scope, 'rabbit-mq-stack', mqStackProps);Connection and communication
Applications talk to RabbitMQ via amqps protocol(5671/tcp). For visual management, use SSH tunneling.
Add the below in your local
~/.ssh/configfile with profile and path updated (works only for SSM-enabled environments):host i-* User ec2-user ProxyCommand sh -c "aws --profile <TargetAccountProfile> ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'" IdentityFile /path/to/ssh_key/for/backend_instanceFind RabbitMQ endpoint hostname and the application BE instance ID to run this command that will open a ssh connection (not an interactive shell with the
-Nflag):ssh -N -L <random_local_port>:<RabbitMQ_endpoint>:443 <BEInstanceID>for example,
ssh -L 56710:b-abcd-ef12-3456-7890-abcdef123456.mq.ap-southeast-2.amazonaws.com:443 i-abcdef1234567890Open your web browser to access to the GUI (get id/pw from environments.ts)
https://localhost:<random_local_port_from_above>for example,
https://localhost:56710
Local development
NPM link can be used to develop the module locally.
- Pull this repository locally
cdinto this repository- run
npm link cdinto the downstream repo (target project, etc) and runnpm link 'aws-rabbitmq-stack'The downstream repository should now include a symlink to this module. Allowing local changes to be tested before pushing.
