I want to setup a infrastructure for a client product and I need to share resources between different ECS Services like VPC, Security Group, RDS so I can avoid recreating EC2 instance and assign a global accelerator to that ec2 instance for static ip
Best & Recommended way to share resources like VPC, Security Rules between different AWS CDK Stack
348 views Asked by Anwar Javed At
1
There are 1 answers
Related Questions in TYPESCRIPT
- It doesnt always show all the books on my homepage
- S3 integration testing
- Make some of the type's field optional
- storybook 7 does not recognize module declarations
- Page in React only renders elements after refreshing
- Error Inserting into Supabase: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member
- vscode, debug angular, first time, doesn't debug, 2nd time stops at main.js then it's ok
- Get remote MKV file metadata using nodejs
- Vue/TailwindCSS - Content is behind Sidebar
- TypeScript Error only on big type only when assigned to a variable
- pnpm firebase app "Could not find a declaration file for module 'mime'"
- TypeScript: Type checking while parsing an arbitrary JSON that is typed/
- Issue with BBCode image tag on React
- Typescript: returnType based on value 'single' prop
- Failed to resolve import, but the path is valid, and detected as such by VSCode
Related Questions in AMAZON-ECS
- Canary deployment using spinnaker in AWS ECS
- AWS CloudFormation stuck at CreateTags
- AWS ECS agent does not start in EC2 instance
- Migrate AWS ECS cluster IPV4 to IPV6
- Mysql error on AWS ECS: [InnoDB] Unable to lock ./ibdata1 error
- Log retation setting for ECS
- No GPU EC2 instances associated with AWS Batch
- How to configure CPU utilized metric for ECS in AWS for Alarm?
- Connection services in different containers in the same ec2 instance
- How to get ECS task to communicate with cloudwatch agent?
- CodePipeline Deploy Stage missing AWSLambda/ automatically update running ecs tasks
- bot3 ecs.execute_command: Task Identifier is invalid
- Step scaling option disabled for ECS Fargate service
- APCu cache in docker container
- Loki on ecs crashes when cleaning up chunks
Related Questions in AWS-CDK
- How to set custom Origin Name in AWS CDK for CloudFront
- Using Python CDK to bundle dotnet 8 code to AWS Lambda function
- Log retation setting for ECS
- Struggling with Route53 public hosted zones in a multi-account environment
- How to get full arn when writing secret based IAM policy in AWS CDK
- AWS Step functions: DistrbituedMap itemReader get bucket and key at runtime from state input in CDK
- Encountering Deployment Error with AWS CDK: Despite Bootstrapping
- ALLOW_ADMIN_USER_PASSWORD_AUTH not getting set in AWS CDK
- JSII ProcessBuilder cannot run program
- EC2 instance being terminated after setting up lifecycle hooks
- Debugging Python AWS CDK application in VSCode
- state.Retry is not iterable
- How to get the exist cluster by name?
- CDK: Remove dependency from DependsOn
- Combining Container, AMI, and ECS builds/deployments in CDK?
Related Questions in AWS-CDK-TYPESCRIPT
- state.Retry is not iterable
- Resolving MODULE_NOT_FOUND Error for Internal Modules with TypeScript Path Aliases in AWS CDK during synthesis/deploymentt
- AWS CDK SFN JsonPath.stringAt to handle minus symbol
- When to use lambda-s3 and when to use s3-lambda from @aws-solutions-constructs in Typescript?
- The runtime parameter of nodejs14.x is no longer supported for creating or updating AWS Lambda functions
- How to enable I or Info button for a AWS CloudWatch dashboard via AWS CDK typescript
- "Unzipped size must be smaller than" with NodejsFunction when in NestedStack
- CDK Reference to already cdk created RDS Database Instance to add tags
- Importing existing aws AppSync pipeline resolver into aws CDK
- Is there a way to connect ALB to an API Gateway privately?
- AWS CDK - Nested SNS Subscription filter policy
- Typescript - validate aws cdk context json configuration
- How do I grant another account rights to create users in cognito pool?
- AWS CDK - Appsync Javascript Resolver Validation with DynamoDB datasource
- CDK Stack Export Resource not Found
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
There's no particular barrier to sharing resources across stacks in the CDK. Just access the objects like any other object.
Create your shared resources in one stack, then simply access them from your other stacks. The CDK will automatically create necessary cloudformation exports and imports.
For example, suppose you create a stack
infraStackwhich contains your vpc, security groups, etc as properties. You can simply pass yourinfraStackobject to the constructor for your other stacks and access the resources in the other stack then use the objects like accessing any object likeinfraStack.vpc.Alternatively, you can explicitly create the exports/imports. For example, you can use CfnOutput to output the id for a VPC. Then you can import this in another stack using
importValuefrom Fn and use that withec2.Vpc.fromLookup-- or if you don't care about hard-coding the VPC id, just callec2.Vpc.fromLookupand hard-code the VPC ID.