You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lambda-elastic-ip-no-nat-gateway-cdk/README.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,9 +30,11 @@ Important: This application uses various AWS services and there are costs associ
30
30
```bash
31
31
cd serverless-patterns/lambda-elastic-ip-no-nat-gateway-cdk/cdk
32
32
```
33
-
3. Install dependencies:
33
+
3. Install dependencies for both the infrastructure project and the typescript project:
34
34
```bash
35
35
npm install
36
+
cd src
37
+
npm install
36
38
```
37
39
38
40
```typescript
@@ -67,19 +69,18 @@ app.synth();
67
69
68
70
## How it works
69
71
70
-
This pattern allows you to assign your lambda function a static public IP address that you can use to interact with APIs that require whitelisted IPs without the need to provision a NAT Gateway. Therefore, this pattern will save almost $33/month in NAT Gateway costs.
72
+
This pattern allows you to assign your lambda function a static public IP address that you can use to interact with APIs that require whitelisted IPs without the need to provision a NAT Gateway. Therefore, this pattern will save almost **$33/month** in NAT Gateway costs.
71
73
72
74
73
75
The following resources will be provisioned:
74
76
75
77
- A Lambda function to test the pattern
76
78
- An Elastic IP to associate with the Lambda function
77
-
- A public subnet in the default VPC
78
79
- A custom resource with Lambda function to associate the Elastic IP with the test lambda's ENI
79
80
80
-
Since AWS manages the provisioning of any Lambda ENI, we cannot access that ENI in CDK code. Therefore, to automate the process, we have to associate the Elastic IP with the ENI in a custom resource after the deployment occurs.
81
+
Since AWS manages the provisioning of any Lambda ENI, we cannot access that ENI in CDK code. Therefore, to automate the process, we have to associate the Elastic IP with the ENI in a custom resource after the deployment occurs and the ENI is provisioned.
81
82
82
-
**_Disclaimer:_** This pattern is best suited for non-production environments since it is not multi-AZ nor highly scalable.
83
+
##### **NOTE:** This pattern is best suited for non-production environments since it is not multi-AZ nor highly scalable.
83
84
84
85
## Testing
85
86
@@ -90,7 +91,7 @@ To test this pattern, you must use both the AWS Console and the AWS CLI.
90
91
1. Open the AWS Lambda Console
91
92
2. Navigate to `vin-api-lambda`
92
93
3. Test the lambda with any payload
93
-
4.A random vin should be returned and logged.
94
+
4.The lambda shouldn't time out and a random vin should be returned and logged.
0 commit comments