By using AWS re:Post, you agree to the Terms of Use

Questions tagged with AWS CodePipeline

Sort by most recent
  • 1
  • 12 / page

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Multi-arch Docker image deployment using CDK Pipelines

I'd like to build a multi-architecture Docker image, push it to the default CDK ECR repo, and then push it to different deployment stages (stacks in separate accounts) using CDK Pipelines. I create the image using something like the following: ``` IMAGE_TAG=${AWS_ACCOUNT}.dkr.ecr.${REGION}.amazonaws.com/cdk-hnb659fds-container-assets-${AWS_ACCOUNT}-${REGION}:myTag docker buildx build --progress=plain \ --platform linux/amd64,linux/arm64 --push \ --tag ${IMAGE_TAG} \ myDir/ ``` This results in three things pushed to ECR, two images and an image index (manifest). I'm then attempting to use the [cdk-ecr-deployment](https://github.com/cdklabs/cdk-ecr-deployment) to copy the image to a specific stack, for example: ``` cdk_ecr_deployment.ECRDeployment( self, "MultiArchImage", src=cdk_ecr_deployment.DockerImageName(f"{cdk_registry}:myTag"), dest=cdk_ecr_deployment.DockerImageName(f"{stack_registry}:myTag"), ) ``` However, this ends up copying only the image corresponding to the platform running the CDK deployment instead of the 2 images plus manifest. There's a [feature request](https://github.com/cdklabs/cdk-ecr-deployment/issues/192) open on `cdk-ecr-deployment` to support multi-arch images. I'm hoping someone might be able to suggest a modification to the above or some alternative that achieves the same goal, which is to deploy the image to multiple environments using CDK Pipelines. I also tried building the images + manifest into a tarball locally and then using the `aws_ecr_assets.TarballImageAsset` construct, but I encountered this [open issue ](https://github.com/aws/aws-cdk/issues/18044) when attempting the deployment locally. I'm not sure if the `TarballImageAsset` supports a multi-arch image, as it seems like the `DockerImageAsset` doesn't. Any ideas?
0
answers
0
votes
3
views
asked a day ago

Unable to Add CodeStarNotification to CodePipeline with properly configured SNS access policy

Currently facing an issue with creating a notification rule for code pipeline using CDK with Pipeline or CodePipeline constructs ``` Resource handler returned message: "Invalid request provided: AWS::CodeStarNotifications::NotificationRule" (RequestToken: <GUID>, HandlerErrorCode: InvalidRequest) ``` The topic and chatbot are already defined in a different stack. The topic already has configured an access policy. However when I attempt to create a rule for my pipelines, it fails. Every time. ``` { "Version": "2008-10-17", "Statement": [ { "Sid": "AWSCodeStarNotifications_publish", "Effect": "Allow", "Principal": { "Service": "codestar-notifications.amazonaws.com" }, "Action": "SNS:Publish", "Resource": "arn:aws:sns:us-east-1:123456789:PipelineNotifications" } ] } ``` Referencing topic: ``` const pipelineNotificationsTopic = sns.Topic.fromTopicArn( this, "PipelineNotifications", `arn:aws:sns:${props?.env.region}:${props?.env.account}:PipelineNotifications ` ); ``` Pipeline code: ``` this.pipeline = new Pipeline( this, `${props?.appName}-MyPipeline`, { pipelineName: "MyPipeline", crossAccountKeys: true, restartExecutionOnUpdate: true, } ); const rule = this.pipeline.notifyOn( "CodeStarRule", pipelineNotificationsTopic, { events: [ PipelineNotificationEvents.PIPELINE_EXECUTION_SUCCEEDED, PipelineNotificationEvents.PIPELINE_EXECUTION_FAILED, PipelineNotificationEvents.ACTION_EXECUTION_FAILED, ], detailType: DetailType.FULL, } ); ``` or ``` this.pipeline = new Pipeline( this, `${props?.appName}-MyPipeline`, { pipelineName: "MyPipeline", crossAccountKeys: true, restartExecutionOnUpdate: true, } ); const rule =new NotificationRule(this, "Notification", { detailType: DetailType.FULL, events: [ "codepipeline-pipeline-pipeline-execution-failed", "codepipeline-pipeline-action-execution-failed", "codepipeline-pipeline-stage-execution-failed", "codepipeline-pipeline-manual-approval-failed", "codepipeline-pipeline-manual-approval-needed", ], source: pipeline, targets: [pipelineNotificationsTopic], }); ```
0
answers
0
votes
19
views
asked 18 days ago

Build error on『MLOps and integrations』

Hello, I have a question about one of the Workshops published in the AWS Workshop studio. I am going through the "MLOps and integrations" hands-on, but it is not working well during the process. Here is the [URL](https://catalog.us-east-1.prod.workshops.aws/workshops/50716cb8-6a42-427f-9eeb-0465dea6e95b/en-US) for the hands-on. Specifically, the build process performed when deploying the provided CloudFormation template will generate an error occurs. I think that the [URL](https://aws-mlops-samples.s3-eu-west-1.amazonaws.com/mnist_output_10.png) for S3 listed in the distributed [source](https://static.us-east-1.prod.workshops.aws/public/3d5c4066-8fc6-4f66-ba73-d0cfe5e3c927/static/code/ml-ops.zip)(source/test.py) in the workshop is probably not valid. Do any of you know how to solve this problem? ----Excerpts from the CodeBuild error log----- Traceback (most recent call last): File "source/test.py", line 20, in <module> test_file, File "/usr/local/lib/python3.6/site-packages/wget.py", line 526, in download (tmpfile, headers) = ulib.urlretrieve(binurl, tmpfile, callback) File "/usr/local/lib/python3.6/urllib/request.py", line 248, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: File "/usr/local/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/usr/local/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/usr/local/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/usr/local/lib/python3.6/urllib/request.py", line 570, in error return self._call_chain(*args) File "/usr/local/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(*args) File "/usr/local/lib/python3.6/urllib/request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden
1
answers
0
votes
49
views
asked 24 days ago
  • 1
  • 12 / page