Skip to content

Commit

Permalink
OST-4198 nginx config fix. (#15)
Browse files Browse the repository at this point in the history
* OST-4198 nginx config fix.

* OST-4198 Fix nginx variables
  • Loading branch information
normundsT1nce authored Jul 22, 2024
1 parent 9b22d52 commit 44dbc92
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ Upgrade Node version from 14 to 18 and multiple project dependencies.
## v2.0.1 (March 2024)

Add workaround to avoid stale connections when DNS host changes IP address.

## v2.0.2 (July 2024)

Fix Nginx resolver configuration to avoid 499 http error codes.
In main CFN template allow to select between t2.micro and t3a.micro EC2 instance types.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
![version](https://img.shields.io/badge/version-2.0.1-blue)
![version](https://img.shields.io/badge/version-2.0.2-blue)

The Open Source project has one clear but distinctive focus - Enabling AWS customers to automatically onboard their IoT Devices into the AWS IoT Core (device-onboarding-as-a-Service) following a self-managed approach. Customers with the "1NCE Connect" product can map their IoT devices via SIM cards to certificates for the AWS IoT Core. The certificates allow publishing, subscription, and connection to AWS IoT Core MQTT broker.

Expand Down Expand Up @@ -65,6 +65,10 @@ E-mail for [SNS Success Topic](#success-topic) subscription. Accepts empty strin
##### SNSFailureTopicSubscriptionEmail:
E-mail for [SNS Failure Topic](#failure-topic) subscription. Accepts empty string for no subscription or valid e-mail address. If an e-mail address is provided, please try to approve the approval request immediately to not miss any events about the stack rollout process.<br />

##### EC2InstanceType:
Instance Type used for EC2 instance.

Default: t2.micro

<br /><br /><br />
# Low-level docs
Expand Down
2 changes: 1 addition & 1 deletion deploymentValues.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: V2.0.1
version: V2.0.2
apiGatewayUrlSSMParamName: openvpn-onboarding-api-gateway-url
onboardingPathSSMParamName: openvpn-onboarding-path
proxyServerSSMParamName: openvpn-onboarding-proxy-server
Expand Down
3 changes: 2 additions & 1 deletion nginxConfig/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ server {

server_name _;
location / {
proxy_pass ${ONBOARDING_ENDPOINT};
set ${DOLLAR}lambda_endpoint ${ONBOARDING_ENDPOINT};
proxy_pass ${DOLLAR}lambda_endpoint;
proxy_set_header onboarding-ip ${DOLLAR}proxy_add_x_forwarded_for;
proxy_set_header x-api-key ${ONBOARDING_X_API_KEY};
proxy_ssl_server_name on;
Expand Down
1 change: 0 additions & 1 deletion templates/autoscaling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Parameters:
EC2InstanceType:
Type: String
Description: Instance Type Used for EC2
Default: t2.micro
VPCPrivateSubnetId:
Type: String
Description: VPC Private Subnet id
Expand Down
9 changes: 9 additions & 0 deletions templates/device-onboarding-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ Parameters:
Description: Email for Success Topic Subscription. Empty string or valid e-mail. Verbose !
Type: String
AllowedPattern: ^$|[^\s@]+@[^\s@]+\.[^\s@]+
EC2InstanceType:
Description: EC2 Instance type
Type: String
Default: t2.micro
AllowedValues:
- t2.micro
- t3a.micro
Mappings:
#=======================================================
#
Expand Down Expand Up @@ -619,6 +626,8 @@ Resources:
Fn::GetAtt:
- SNSResourcesStack
- Outputs.SNSFailureTopicArn
EC2InstanceType:
Ref: EC2InstanceType
SnsSuccessSummaryTopicARN:
Fn::GetAtt:
- SNSResourcesStack
Expand Down

0 comments on commit 44dbc92

Please sign in to comment.