1
votes

I have been trying to use the update functionality of the AWS CLI to update codepipeline with the following command:

aws codepipeline update-pipeline --cli-input-json file://Pipelines/AWS/SomeName.json

And I keep getting the following error

Unknown parameter in pipeline.stages[0].actions[0]: "region", must be one of: name, actionTypeId, runOrder, configuration, outputArtifacts, inputArtifacts, roleArn

I have checked the documentation for AWS and I donĀ“t think theres anything wrong with the way actions is set up, here is the snippet from JSON:

"actions": [
                    {
                        "name": "Source",
                        "actionTypeId": {
                            "category": "Source",
                            "owner": "AWS",
                            "provider": "S3",
                            "version": "1"
                        },
                        "runOrder": 1,
                        "configuration": {
                            "PollForSourceChanges": "false",
                            "S3Bucket": "some-bucket-name",
                            "S3ObjectKey": "someEnvironment/someZip.zip"
                        },
                        "outputArtifacts": [
                            {
                                "name": "SourceArtifact"
                            }
                        ],
                        "inputArtifacts": [],
                        "region": "eu-west-1"
                    },...
]

According to the documentation provided at https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-S3.html everything seems to be correct. Removing the region parameter updates the pipeline correctly but I am unsure of the consequences that could have on the updates itself

Any help is appreciated.

Cheers Sky

1

1 Answers

0
votes

If you try to create the pipeline through the AWS console and choose S3 as a source you will notice the region option is not available (as shown in the screenshot below). I would say this is a current limitation to the service more then a chosen design and a gap in documentation (however, happy to be proven wrong).

However, you could try include the full S3 bucket Arn which would include the region. Or take comfort in that any action deployed (without a region specified) defaults to the same region that the codepipeline is in, as per the AWS documentation.

enter image description here