albert's blog

2024/02/11

透過 AWS API Gateway (Rest API) 呼叫 Lambda

›
設定步驟如下 1.  在 Lambda 撰寫簡單的 Python 程式 def lambda_handler (event, context): return { 'statusCode' : 200 , 'b...
2024/02/10

使用 AWS API Gateway 整合 Lambda

›
以下是我的 Lambda code,他會取得網址的 name 參數值,並組成 "Hello World~"+name參數值的字串 def lambda_handler (event, context): # 從事件對象的 queryStringP...
2024/02/09

執行 AWS PutMetricData operation 出現錯誤:The parameter MetricData.member.1.Timestamp must specify a time no more than two hours in the future

›
Problem AWS PutMetricData operation 內容如下 #!/bin/bash aws cloudwatch put-metric-data --metric-name CriticalError --namespace MyService --va...

AWS CloudWatch log group 未如預期出現所設定的 log group name

›
Problem 安裝 CloudWatch Agent 至 EC2,並將設定的 metrics 資料傳送至AWS CloudWatch log group,但在畫面未能找到所指定的 log group name。 config.json 的內容如下 { ...
2024/02/07

如何透過 AWS Lambda 呼叫 SES (Simple Email Service) 發信

›
實作步驟如下 1. 建立 Verified Identities來做為測試用途的 Sender 與 Receiver email address 2. 建立 Lambda Function 後,進入 Configuration => Permission,確認該 Role ...

透過 AWS EC2 Connect 連入編輯檔案,出現 "index.html" E212: Can't open file for writing 錯誤

›
Problem 透過 AWS EC2 Connect 連入編輯檔案,出現 "index.html" E212: Can't open file for writing 錯誤 Root Cause 會出現上述問題是因為權限不足所導致 How-To [...

AWS CloudShell 無法成功執行指令

›
Problem 我在 CloudShell 執行以下指令,卻無法正常執行 aws cognito-identity set-identity-pool-roles \ --identity-pool-id "us-east-1:xxxx-xxxx-xxxx-xxxx...
2024/02/06

AWS CloudFormation Error: TemplateURL must be a supported URL

›
Problem 當我要執行以下 CloudFormation yaml file: { "AWSTemplateFormatVersion" : "2010-09-09", "Resources" :...
2024/02/05

AWS CloudFormation Error Code: InvalidAMIID.NotFound

›
Problem 當我透過已經編輯好的 CloudFormation yaml file 來建立相關資源,出現以下錯誤訊息 Root Cause 因為 yaml file 中的 image id 在該 region 不存在,所以會出現上述錯誤 How-To Fix image id...

AWS CloudFormation 建立失敗:The key pair 'irkp' does not exist (Service: AmazonEC2; Status Code: 400; Error Code: InvalidKeyPair.NotFound

›
Problem 當我透過 CLI 建立相關 AWS 資源 aws cloudformation create - stack -- stack - name CodeDeployDemoStack - 2 \ -- template - url https: // my - ...
2024/02/04

AWS CodeDploy 失敗:Zip end of central directory signature not found

›
Problem 我已經 upload source code 到指定 S3 bucket,並規劃透過 CodeDploy 從 S3 bucket 上傳 source code 到指定的 EC2 instances,但發生錯誤 Root Cause 經查 Deployment li...
2024/01/14

"errorMessage": "require is not defined in ES module scope, you can use import instead"

›
Problem 我在跟著 cloudguru 的 lab,學習如何寫一個簡單的 Node.js Lambda function const https = require( 'https' ); let url = "https://...
‹
›
Home
View web version
Powered by Blogger.