-
Notifications
You must be signed in to change notification settings - Fork 1k
New serverless pattern - Multi Account Private API Gateway #2515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New serverless pattern - Multi Account Private API Gateway #2515
Conversation
…thub.com:usama-khan98/serverless-patterns into usama-khan98-feature-multi-account-private-apigw
| 2. During the prompts: | ||
| - Enter **stack name** and desired **AWS Region**. | ||
| - Enter **Instance type** either `t2.micro` or `t2.small` | ||
| - Enter **unique [AMI Id](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html)** from chosen region. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What AMI do I need to search for?
|
|
||
| ## How it works | ||
|
|
||
| This pattern utilizes four accounts and their respective templates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| This pattern utilizes four accounts and their respective templates. | |
| This pattern utilizes three accounts and their respective templates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this and others, keep one at the root folder if necessary
| @@ -0,0 +1,80 @@ | |||
| { | |||
| "title": "Enabling East/West Communication in Multi-Account AWS Architectures with Private API Gateway", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Title needs to be 75 characters or less, please reword
| "name": "Usama Ali Khan", | ||
| "image": "https://media.licdn.com/dms/image/v2/D4E03AQHcLMpZ1LV9UQ/profile-displayphoto-shrink_800_800/profile-displayphoto-shrink_800_800/0/1685892371158?e=1737590400&v=beta&t=RaPZkIgm7m3thW4PyKSQNn_w9fMbYBeu5PPrQ6K4vBU", | ||
| "bio": "Usama is a Technical Account Manager at Amazon Web Services.", | ||
| "linkedin": "https://www.linkedin.com/in/usama-ali-khan/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "linkedin": "https://www.linkedin.com/in/usama-ali-khan/" | |
| "linkedin": "usama-ali-khan" |
| "repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/sfn-athena-cdk-python", | ||
| "templateURL": "serverless-patterns/multi-account-private-apigw", | ||
| "projectFolder": "multi-account-private-apigw", | ||
| "templateFile": "multi-account-private-apigw/centralAccount/template.yaml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "templateFile": "multi-account-private-apigw/centralAccount/template.yaml" | |
| "templateFile": "centralAccount/template.yaml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove as well
| 3. For **/image** path, use the following curl command (*you can update the prompt and image name as needed*): | ||
| ```bash | ||
| curl --location --request POST 'https://abcdefghij.execute-api.eu-west-1.amazonaws.com/Prod/image' \ | ||
| --data 'A bustling futuristic city at night with neon signs, towering skyscrapers, flying vehicles, and busy street life, in the rain. Detailed and atmospheric.' --output image.jpg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still relevant?
| ## Testing | ||
| 1. Once you have deployed all the Stacks, [connect to your EC2 instance using SSH](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/connect-to-linux-instance.html) or [using EC2 Instance Connect](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/connect-linux-inst-eic.html) in **Central Account**. | ||
|
|
||
| 2. After connecting to the EC2 instance, run the following `curl` command from the outputs to test the **/text** path (you can add `-v` flag for verbose response): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by "from the outputs"?
…ragraph from the code and fixed the title
bfreiberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks almost perfect, just some minor adjustments
Co-authored-by: Ben <9841563+bfreiberg@users.noreply.github.com>
Co-authored-by: Ben <9841563+bfreiberg@users.noreply.github.com>
Co-authored-by: Ben <9841563+bfreiberg@users.noreply.github.com>
|
Looks good, thanks for your contribution. Your pattern will be merged to Serverlessland soon. |
Issue #, if available: 2516
Description of changes:
New SAM templates to create Private REST API Gateway in multiple accounts and integrate with the central account.
This pattern deploys four separate AWS accounts: a client account with an EC2 instance and VPC Endpoint for testing, a central account hosting the main API Gateway and routing components, an account with an ECS Fargate service behind a private API Gateway, and another account with a Lambda function integrated with Amazon Bedrock for image generation. Each account contains its own AWS resources to ensure proper communication and isolation.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.