From 8b44e80ec947cfea1c6074f86f3383b404fb5f8c Mon Sep 17 00:00:00 2001 From: kakakakakku Date: Sat, 22 Aug 2026 14:01:18 +0900 Subject: [PATCH 1/3] apigw-websocket-api-sns-terraform: Update AWS Provider to v6 --- apigw-websocket-api-sns-terraform/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apigw-websocket-api-sns-terraform/main.tf b/apigw-websocket-api-sns-terraform/main.tf index 9b1a8fd078..3f85fdac20 100644 --- a/apigw-websocket-api-sns-terraform/main.tf +++ b/apigw-websocket-api-sns-terraform/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = "~> 4.0.0" + version = "~> 6.0" } random = { source = "hashicorp/random" From e9608d3c01010733e6ac5edc9da313012ba2e8e8 Mon Sep 17 00:00:00 2001 From: kakakakakku Date: Sat, 22 Aug 2026 14:10:06 +0900 Subject: [PATCH 2/3] apigw-websocket-api-sns-terraform: Fix deprecated name argument of aws_region data source --- apigw-websocket-api-sns-terraform/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apigw-websocket-api-sns-terraform/main.tf b/apigw-websocket-api-sns-terraform/main.tf index 3f85fdac20..eddebd95b3 100644 --- a/apigw-websocket-api-sns-terraform/main.tf +++ b/apigw-websocket-api-sns-terraform/main.tf @@ -158,7 +158,7 @@ resource "aws_apigatewayv2_integration_response" "disconnect_route_integration_r resource "aws_apigatewayv2_integration" "send_order_route_integration" { api_id = aws_apigatewayv2_api.web_socket_api.id integration_type = "AWS" - integration_uri = "arn:aws:apigateway:${data.aws_region.current.name}:sns:action/Publish" + integration_uri = "arn:aws:apigateway:${data.aws_region.current.region}:sns:action/Publish" credentials_arn = aws_iam_role.apigw_sns_demo_functionrole.arn integration_method = "POST" content_handling_strategy = "CONVERT_TO_TEXT" @@ -206,5 +206,5 @@ resource "aws_apigatewayv2_integration_response" "send_order_route_integration_r output "api_endpoint" { description = "API Gateway endpoint URL" - value = "wss://${aws_apigatewayv2_api.web_socket_api.id}.execute-api.${data.aws_region.current.name}.amazonaws.com/${var.api_stage_name}" + value = "wss://${aws_apigatewayv2_api.web_socket_api.id}.execute-api.${data.aws_region.current.region}.amazonaws.com/${var.api_stage_name}" } From d87f9ee9ab7c727fb307702ed83b90afc44a5d57 Mon Sep 17 00:00:00 2001 From: kakakakakku Date: Sat, 22 Aug 2026 14:15:26 +0900 Subject: [PATCH 3/3] apigw-websocket-api-sns-terraform: Fix service name spelling in README --- apigw-websocket-api-sns-terraform/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apigw-websocket-api-sns-terraform/README.md b/apigw-websocket-api-sns-terraform/README.md index 17d9f77039..27b2452f96 100644 --- a/apigw-websocket-api-sns-terraform/README.md +++ b/apigw-websocket-api-sns-terraform/README.md @@ -37,7 +37,7 @@ Important: this application uses various AWS services and there are costs associ ## How it works -This sample project demonstrates how to use WebSocket API to integrate with Amazon Simple Notification service (SNS) to send notifications. This pattern also implements data validation in WebSocket API using model in API Gateway. This template does not implement Authentication in WebSocket API to keep it simple. However, it is recommended to implement Authentication on WebSocket API. +This sample project demonstrates how to use WebSocket API to integrate with Amazon Simple Notification Service (SNS) to send notifications. This pattern also implements data validation in WebSocket API using model in Amazon API Gateway. This template does not implement Authentication in WebSocket API to keep it simple. However, it is recommended to implement Authentication on WebSocket API. This pattern is utilizing native AWS Integration between WebSocket API Gateway and SNS. Request template is used in WebSocket integration to map the input to SNS payload. This pattern is also a workaround to invoke AWS services in WebSocket API which requires Content-Type header to be application/x-www-form-urlencoded. By default, WebSocket APIs do not support overriding headers from AWS console and supports application/json in Content-Type header. @@ -87,4 +87,4 @@ Once the application is deployed, retrieve the `websocket_URI` value from output ---- Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. -SPDX-License-Identifier: MIT-0 \ No newline at end of file +SPDX-License-Identifier: MIT-0