title: Codepipeline restricting artifact properties in codebuild
body: <p>I had created a codebuild to build my project based on the changes in codecommit. This is the <code>batch-get-projects</code> command details for it</p>
  
  <pre><code>{
      "projects": [
          {
              "name": "MultiRepBuild",
              "arn": "arn:aws:codebuild:us-east-1:100000xxx0x:project/MultiRepBui
  ld",
              "source": {
                  "type": "CODECOMMIT",
                  "location": "https://git-codecommit.us-east-1.amazonaws.com/v1/r
  epos/PythonRep",
                  "gitCloneDepth": 1,
                  "insecureSsl": false
              },
              "secondarySources": [],
              "artifacts": {
                  "type": "S3",
                  "location": "testxxxthe-codebuild",
                  "path": "",
                  "namespaceType": "NONE",
                  "name": "Lambda",
                  "packaging": "ZIP",
                  "overrideArtifactName": false,
                  "encryptionDisabled": false
              },
              "secondaryArtifacts": [],
              "cache": {
                  "type": "NO_CACHE"
              },
              "environment": {
                  "type": "LINUX_CONTAINER",
                  "image": "aws/codebuild/python:3.6.5",
                  "computeType": "BUILD_GENERAL1_SMALL",
                  "environmentVariables": [],
                  "privilegedMode": false
              },
              "serviceRole": "arn:aws:iam::xxxxxxxx:role/service-role/codebuil
  d-MultiRepBuild-service-role",
              "timeoutInMinutes": 60,
              "encryptionKey": "arn:aws:kms:us-east-1:xxxxxx:alias/aws/s3",
              "tags": [],
              "created": 1542607679.567,
              "lastModified": 1542611632.345,
              "badge": {
                  "badgeEnabled": false
              }
          }
      ],
      "projectsNotFound": []
  }
  </code></pre>
  
  <p>This codebuild will create a buildartifact with specified name <code>Lambda</code> and keep it in specified bucket in zip format.</p>
  
  <p>But when i integrate same codebuild with the Codepipeline it is overriding the bucketname as per this <a href="https://stackoverflow.com/questions/49291962/aws-codepipeline-doesnt-upload-artifacts-to-aws-s3">answer</a>. Even i try to change the bucketname with cloudformation but how can i add the parameters that are defined in the artifacts section(i.e.<code>name</code>) from the above snippet, because i will point this <code>name</code> as an <code>S3KeyName</code> in my cloudformation template.</p>
  
  <p>I tried to change in the name in below file which i got through by running <code>aws codepipeline get-pipeline --name MyFirstPipeline &gt;pipeline.json</code> command</p>
  
  <pre><code>{
      "pipeline": {
          "name": "MultiBuild",
          "roleArn": "arn:aws:iam::xxxxxxxxxxx:role/service-role/AWSCodePipelineServiceRole-us-east-1-MultiBuild",
          "artifactStore": {
              "type": "S3",
              "location": "codepipeline-us-east-1-xxxxx"
          },
          "stages": [
              {
                  "name": "Source",
                  "actions": [
                      {
                          "name": "Source",
                          "actionTypeId": {
                              "category": "Source",
                              "owner": "AWS",
                              "provider": "CodeCommit",
                              "version": "1"
                          },
                          "runOrder": 1,
                          "configuration": {
                              "BranchName": "master",
                              "PollForSourceChanges": "false",
                              "RepositoryName": "PythonRep"
                          },
                          "outputArtifacts": [
                              {
                                  "name": "SourceArtifact"
                              }
                          ],
                          "inputArtifacts": []
                      }
                  ]
              },
              {
                  "name": "Build",
                  "actions": [
                      {
                          "name": "Build",
                          "actionTypeId": {
                              "category": "Build",
                              "owner": "AWS",
                              "provider": "CodeBuild",
                              "version": "1"
                          },
                          "runOrder": 1,
                          "configuration": {
                              "ProjectName": "MultiRepBuild"
                          },
                          "outputArtifacts": [
                              {
                                  "name": "Lambda" --&gt;Here
                              }
                          ],
                          "inputArtifacts": [
                              {
                                  "name": "SourceArtifact"
                              }
                          ]
                      }
                  ]
              }
          ],
          "version": 1
      }
  }
  </code></pre>
  
  <p>This is creating a folder with name <code>Lambda</code> rather than creating a file. The file structure is like this</p>
  
  <pre><code> ---MultiBuild
        |
        |
        --&gt;Lambda
            |
            |
            abcd.zip
        --&gt;SourceArti
            |
            |
            efgh.zip
  </code></pre>