[aws-ecs][aws-codepipeline-actions][aws-codepipeline]: ecs.FargateService.fromFargateServiceArn
See original GitHub issueI’m trying to create a pipeline with a deploy step that should deploy from the pipeline account to another account.
Unfortunately I’m not able to get it running.
private getEcsFargateService(stage: string): ecs.IFargateService {
const props = this.node.tryGetContext(stage); // needed to figure out which account and region is used
const clusterName = 'myCluster';
const ecsServiceName = 'myService';
const fargateServiceArn = `arn:aws:ecs:${props.region}:${props.account}:service/${clusterName}/${ecsServiceName}`;
const fargateService = ecs.FargateService.fromFargateServiceArn(this.stack, `MLEcsFargateService-${stage}`, fargateServiceArn);
return fargateService;
}
private getDeployToDevStage(): codepipeline.StageProps {
return {
stageName: 'Deploy-Dev',
actions: [
new codepipelineActions.EcsDeployAction({
actionName: 'Deploy-Dev',
input: buildDeployImageOutput,
service: this.getEcsFargateService('dev')
})
]
}
}
In this line service: this.getEcsFargateService('dev')
I’m getting the error:
Property 'cluster' is missing in type 'IFargateService' but required in type 'IBaseService'
I think the account, region and cluster name should already be defined in the arn, isn’t it?
Reproduction Steps
just try out the code written above
What did you expect to happen?
I would expect that the IFargateService could be used in the CodePipeline action.
What actually happened?
Error occured: Property 'cluster' is missing in type 'IFargateService' but required in type 'IBaseService'
Environment
- CDK CLI Version : 1.77.0
- **Framework Version: ** 1.77.0
- Node.js Version: I guess the one used by codebuild.LinuxBuildImage.STANDARD_4_0
- OS : codebuild.LinuxBuildImage.STANDARD_4_0
- Language (Version):
Other
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
ecs.FargateService - AWS Documentation - Amazon.com
No information is available for this page.
Read more >awsx.ecs.FargateService - Pulumi
Documentation for the awsx.ecs.FargateService resource with examples, input properties, output properties, lookup functions, and supporting types.
Read more >AWS CDK EcsDeployAction update existing Fargate Service
Pipeline(this, 'MyPipeline') // import an existing fargate service const fargateService = ecs.FargateService.fromFargateServiceArn( this, " ...
Read more >Deploy ECS Fargate service - Snyk User Docs
In the following set of commands we are going to use CloudFormation to deploy services that will allow our Unicorn Store application to...
Read more >In what way does a new ECS Fargate service not satisfy the ...
When creating a new AWS ECS service using a Fargate task, in the AWS Console wizard, it fails with the following error:
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes that worked! 😃 thank you very much!
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.