https://github.com/alexzhangs/aws-cfn-vpc-peer-requester
AWS CloudFormation Stack for VPC Peering Requester.
https://github.com/alexzhangs/aws-cfn-vpc-peer-requester
aws aws-cloudformation vpc-peer-connection
Last synced: 6 months ago
JSON representation
AWS CloudFormation Stack for VPC Peering Requester.
- Host: GitHub
- URL: https://github.com/alexzhangs/aws-cfn-vpc-peer-requester
- Owner: alexzhangs
- Created: 2019-07-17T14:42:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-02T18:07:48.000Z (almost 2 years ago)
- Last Synced: 2025-01-08T13:52:19.152Z (12 months ago)
- Topics: aws, aws-cloudformation, vpc-peer-connection
- Homepage:
- Size: 12.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# aws-cfn-vpc-peer-requester
AWS CloudFormation Stack for VPC Peering Requester.
## Usage
### stack.json
This repo contains a standard AWS CloudFormation template `stack.json`
which can be deployed with AWS web console, AWS CLI or any other AWS
CloudFormation compitable tool.
This repo can be used along with below repoes:
* [aws-cfn-vpc-peer-accepter](https://github.com/alexzhangs/aws-cfn-vpc-peer-accepter)
* [aws-cfn-vpc](https://github.com/alexzhangs/aws-cfn-vpc)
To create cross account VPC peer connections, one accepter peers with
multi requesters. These repoes may make the process easier.
However you will need to make a new template to put all these together,
put `aws-cfn-vpc`, `aws-cfn-vpc-peer-accepter` and
`aws-cfn-vpc-peer-requester` as the nested stack of your new stack.
About how to do this, you may refer to a real world example
[aws-cfn-vpn](https://github.com/alexzhangs/aws-cfn-vpn), which put
all these together, and is able to create one(accepter) to many(requester) cross
account VPC peer connections.
This template will create an AWS CloudFormation stack, including
following resources:
* 1 peer connection between 2 VPCs.
* 1 route entry in the route table for the peer connection.
* 1 IAM role to give the Lambda function necessary permissions for the
SQS, and the logs.
* 1 Lambda function to send SQS messages to trigger the Lambda funcion
in another VPC.
* 1 CloudFormation Custom Resource to trigger the Lambda function of
this stack.
For the input parameters and the detail of the template, please check the template
file.
## Troubleshooting
1. CloudFormation Event: PeerConnection CREATE_FAILED: VpcPeeringConnection failed to stabilize. State: [failed]
Check following input parameters, make sure they were set right:
1. VpcPeerAccepterVpcId
2. VpcPeerAccepterRegion
3. VpcPeerAccepterAccountId
4. VpcPeerAccepterRoleArn
1. The VPC peer connection is active but connecting to the IP of the
resource in the peering VPC is timeout.
Check following AWS resources on the console:
1. CloudWatch -> Logs, check the log of Lambda execution.
2. VPC -> Route Tables -> Routes.
3. Lambda - Functions.
4. IAM - Role.