Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-14367

Unable to set Custom AWS region

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Answered
    • None
    • Elastic Bamboo
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      com.atlassian.aws.Ec2ClientFactoryImpl has 2 constructors: default (with endpoint = null) and com.atlassian.aws.Ec2ClientFactoryImpl#Ec2ClientFactoryImpl(java.lang.String) which accepts custom endpoint URL.

      In atlassian-bamboo-5.4.1-source/atlassian-bamboo/components/bamboo-web-app/src/main/resources/applicationContextAgentServer.xml the default constructor is used:

      <bean id="awsAccountBean" class="com.atlassian.bamboo.agent.elastic.aws.AwsAccountBeanImpl" plugin:available="true">
          <constructor-arg ref="elasticAccountBean"/>
          <constructor-arg>
            <bean class="com.atlassian.aws.AWSManagerImpl">
              <constructor-arg>
                ***<bean class="com.atlassian.aws.Ec2ClientFactoryImpl"/>***
              </constructor-arg>
              <constructor-arg ref="elasticScheduledExecutorService"/>
            </bean>
          </constructor-arg>
          <property name="maximumEbsVolumeStatusAgeSeconds" value="${bamboo.agent.elastic.defaultMaximumAwsResourceStatusAgeSeconds}"/>
          <property name="maximumInstanceStatusAgeSeconds" value="${bamboo.agent.elastic.defaultMaximumAwsResourceStatusAgeSeconds}"/>
          <property name="maximumSpotRequestStatusAgeSeconds" value="${bamboo.agent.elastic.defaultMaximumAwsResourceStatusAgeSeconds}"/>
        </bean>
      

      Method com.atlassian.aws.Ec2ClientFactoryImpl#newAwsAsyncClient(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region, com.amazonaws.auth.AWSCredentials, java.util.concurrent.ScheduledExecutorService) throws IllegalArgumentException("No custom endpoint available") when Custom region is selected:

       @Override
          @NotNull
          public AmazonEC2AsyncClient newAwsAsyncClient(@NotNull final AwsSupportConstants.Region region, @NotNull final AWSCredentials awsCredentials, @NotNull final ScheduledExecutorService scheduledExecutorService)
          {
              if (region == AwsSupportConstants.Region.CUSTOM)
              {
                  if (endpoint==null)
                  {
                      ****throw new IllegalArgumentException("No custom endpoint available");***
                  }
                  return newAwsAsyncClient(endpoint, awsCredentials, scheduledExecutorService);
              }
              return newAwsAsyncClient(region.getEndpoint(), awsCredentials, scheduledExecutorService);
          }
      

      It would be great if the custom endpoint URL input will be shown when Custom AWS region is selected. For example:

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dzagorovsky1 Dmitry Zagorovsky [StiltSoft]
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: