AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::AmazonMQ::Broker

CfnBroker

Creates a broker. Note: This API is asynchronous. To create a broker, you must either use the `AmazonMQFullAccess` IAM policy or include the following EC2 permissions in your IAM policy. - `ec2:CreateNetworkInterface` This permission is required to allow Amazon MQ to create an elastic network interface (ENI) on behalf of your account. - `ec2:CreateNetworkInterfacePermission` This permission is required to attach the ENI to the broker instance. - `ec2:DeleteNetworkInterface` - `ec2:DeleteNetworkInterfacePermission` - `ec2:DetachNetworkInterface` - `ec2:DescribeInternetGateways` - `ec2:DescribeNetworkInterfaces` - `ec2:DescribeNetworkInterfacePermissions` - `ec2:DescribeRouteTables` - `ec2:DescribeSecurityGroups` - `ec2:DescribeSubnets` - `ec2:DescribeVpcs` For more information, see [Create an IAM User and Get Your AWS Credentials](https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/amazon-mq-setting-up.html#create-iam-user) and [Never Modify or Delete the Amazon MQ Elastic Network Interface](https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/connecting-to-amazon-mq.html#never-modify-delete-elastic-network-interface) in the *Amazon MQ Developer Guide* .

Import

import { CfnBroker } from 'aws-cdk-lib/aws-amazonmq';

Or use the module namespace:

import * as amazonmq from 'aws-cdk-lib/aws-amazonmq';
// amazonmq.CfnBroker

Properties

Configuration passed to the constructor as CfnBrokerProps.

brokerNameRequired
string

Required. The broker's name. This value must be unique in your AWS account , 1-50 characters long, must contain only letters, numbers, dashes, and underscores, and must not contain white spaces, brackets, wildcard characters, or special characters. > Do not add personally identifiable information (PII) or other confidential or sensitive information in broker names. Broker names are accessible to other AWS services, including CloudWatch Logs . Broker names are not intended to be used for private or sensitive data.

deploymentModeRequired
string

Required. The broker's deployment mode.

engineTypeRequired
string

Required. The type of broker engine. Currently, Amazon MQ supports `ACTIVEMQ` and `RABBITMQ` .

hostInstanceTypeRequired
string

Required. The broker's instance type.

publiclyAccessibleRequired
boolean | IResolvable

Enables connections from applications outside of the VPC that hosts the broker's subnets. Set to `false` by default, if no value is provided.

authenticationStrategyOptional
string

Optional. The authentication strategy used to secure the broker. The default is `SIMPLE` .

autoMinorVersionUpgradeOptional
boolean | IResolvable

Enables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot. Set to `true` by default, if no value is specified. > Must be set to `true` for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.

configurationOptional
IResolvable | ConfigurationIdProperty

A list of information about the configuration.

dataReplicationModeOptional
string

Defines whether this broker is a part of a data replication pair.

dataReplicationPrimaryBrokerArnOptional
string

The Amazon Resource Name (ARN) of the primary broker that is used to replicate data from in a data replication pair, and is applied to the replica broker. Must be set when dataReplicationMode is set to CRDR.

encryptionOptionsOptional
IResolvable | EncryptionOptionsProperty

Encryption options for the broker.

engineVersionOptional
string

The broker engine version. Defaults to the latest available version for the specified broker engine type. For more information, see the [ActiveMQ version management](https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/activemq-version-management.html) and the [RabbitMQ version management](https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/rabbitmq-version-management.html) sections in the Amazon MQ Developer Guide.

ldapServerMetadataOptional
IResolvable | LdapServerMetadataProperty

Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.

logsOptional
IResolvable | LogListProperty

Enables Amazon CloudWatch logging for brokers.

maintenanceWindowStartTimeOptional
IResolvable | MaintenanceWindowProperty

The parameters that determine the WeeklyStartTime.

securityGroupsOptional
string[]

The list of rules (1 minimum, 125 maximum) that authorize connections to brokers.

storageTypeOptional
string

The broker's storage type.

subnetIdsOptional
string[]

The list of groups that define which subnets and IP ranges the broker can use from different Availability Zones. If you specify more than one subnet, the subnets must be in different Availability Zones. Amazon MQ will not be able to create VPC endpoints for your broker with multiple subnets in the same Availability Zone. A SINGLE_INSTANCE deployment requires one subnet (for example, the default subnet). An ACTIVE_STANDBY_MULTI_AZ Amazon MQ for ActiveMQ deployment requires two subnets. A CLUSTER_MULTI_AZ Amazon MQ for RabbitMQ deployment has no subnet requirements when deployed with public accessibility. Deployment without public accessibility requires at least one subnet. > If you specify subnets in a [shared VPC](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-sharing.html) for a RabbitMQ broker, the associated VPC to which the specified subnets belong must be owned by your AWS account . Amazon MQ will not be able to create VPC endpoints in VPCs that are not owned by your AWS account .

tagsOptional
TagsEntryProperty[]

Create tags when creating the broker.

usersOptional
IResolvable | IResolvable | UserProperty[]

The list of broker users (persons or applications) who can access queues and topics. For Amazon MQ for RabbitMQ brokers, one and only one administrative user is accepted and created when a broker is first provisioned. All subsequent broker users are created by making RabbitMQ API calls directly to brokers or via the RabbitMQ web console. When OAuth 2.0 is enabled, the broker accepts one or no users.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter