Replies: 2 comments
-
Hi @snegostup, |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @SoManyHs, import ec2 = require('@aws-cdk/aws-ec2');
import ecs = require('@aws-cdk/aws-ecs');
import ecs_patterns = require('@aws-cdk/aws-ecs-patterns');
import cdk = require('@aws-cdk/core');
import path = require('path');
const app = new cdk.App();
const stack = new cdk.Stack(app, 'FargateServiceWithLocalImage');
// Create VPC and Fargate Cluster
// NOTE: Limit AZs to avoid reaching resource quotas
const vpc = new ec2.Vpc(stack, 'MyVpc', { maxAzs: 2 });
const cluster = new ecs.Cluster(stack, 'Cluster', { vpc });
// Instantiate Fargate Service with a cluster and a local image that gets
// uploaded to an S3 staging bucket prior to being uploaded to ECR.
// A new repository is created in ECR and the Fargate service is created
// with the image from ECR.
new ecs_patterns.NetworkLoadBalancedFargateService(stack, "FargateService", {
cluster,
taskImageOptions: {
image: ecs.ContainerImage.fromAsset(path.resolve(__dirname, 'local-image'))
},
});
app.synth(); In 'aws configure' I specify the user that has AdministratorAccess group policy attached. Should I do anything else? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Getting this error:
CDK Version: 1.18.0 (build bc924bc)
Beta Was this translation helpful? Give feedback.
All reactions