AWS CodeDeploy task not working for Deployments

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 5.9-OD-3
    • Affects Version/s: 5.9-OD-01
    • Component/s: None

      According to the Using the AWS CodeDeploy task documentation, the user should be able to use this task inside the Environment of a Deployment project, in Bamboo Cloud. However, the task is failing and Bamboo is displaying the following error message via the UI:

      18-May-2015 13:52:46	Error occurred while running Task 'deploy to aws(3)' of type com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-aws-codedeploy:task.aws.codeDeploy.
      18-May-2015 13:52:46	java.lang.NullPointerException
      18-May-2015 13:52:46	        at com.atlassian.bamboo.plugins.aws.credentials.AwsCredentials.fromCredentialsData(AwsCredentials.java:75)
      18-May-2015 13:52:46	        at com.atlassian.bamboo.plugins.aws.codedeploy.CodeDeployTask.zipAndUploadWorkingDirToS3(CodeDeployTask.java:109)
      18-May-2015 13:52:46	        at com.atlassian.bamboo.plugins.aws.codedeploy.CodeDeployTask.execute(CodeDeployTask.java:81)
      18-May-2015 13:52:46	        at com.atlassian.bamboo.task.TaskExecutorImpl$3.call(TaskExecutorImpl.java:288)
      18-May-2015 13:52:46	        at com.atlassian.bamboo.task.TaskExecutorImpl$3.call(TaskExecutorImpl.java:284)
      18-May-2015 13:52:46	        at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:200)
      18-May-2015 13:52:46	        at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:284)
      18-May-2015 13:52:46	        at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:106)
      18-May-2015 13:52:46	        at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:75)
      18-May-2015 13:52:46	        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:196)
      18-May-2015 13:52:46	        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:113)
      18-May-2015 13:52:46	        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:118)
      18-May-2015 13:52:46	        at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
      18-May-2015 13:52:46	        at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
      18-May-2015 13:52:46	        at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
      18-May-2015 13:52:46	        at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
      18-May-2015 13:52:46	        at java.lang.Thread.run(Thread.java:745)
      

      And the following error message in the logs:

      @400000005557cc0b04e107f4 com.atlassian.bamboo.plugins.aws.core.AwsException: Error listing s3 buckets.
      @400000005557cc0b04e107f4       at com.atlassian.bamboo.plugins.aws.core.s3.S3ServiceImpl.getBuckets(S3ServiceImpl.java:53)
      @400000005557cc0b04e10bdc       at com.atlassian.bamboo.plugins.aws.credentials.api.service.RestS3ServiceImpl.getBuckets(RestS3ServiceImpl.java:45)
      @400000005557cc0b04e12b1c       at com.atlassian.bamboo.plugins.aws.credentials.api.S3Resource.getBuckets(S3Resource.java:75)
      @400000005557cc0b04e12b1c       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      @400000005557cc0b04e12b1c       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      @400000005557cc0b04e12f04       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      @400000005557cc0b04e132ec       at java.lang.reflect.Method.invoke(Method.java:597)
      @400000005557cc0b04e132ec       at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:234)
      @400000005557cc0b04e136d4       at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:100)
      @400000005557cc0b04e1428c       at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61)
      @400000005557cc0b04e1428c       at com.atlassian.plugins.rest.common.expand.interceptor.ExpandInterceptor.intercept(ExpandInterceptor.java:38)
      @400000005557cc0b04e14674       at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61)
      @400000005557cc0b04e14a5c       at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.invokeMethodWithInterceptors(DispatchProviderHelper.java:132)
      @400000005557cc0b04e14e44       at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker._dispatch(DispatchProviderHelper.java:230)
      

      Looks like Bamboo is not sending shared credentials to deployment build context. Therefore it fails to authenticate and get the list of S3 buckets available.

              Assignee:
              Unassigned
              Reporter:
              Bruno Rosa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: