albert's blog
2024/06/10
[AWS Cloud Shell Error] eksctl: command not found
›
Problem 當我透過 CloudShell 執行 eksctl 指令出現以下錯誤訊息 [ cloudshell-user@ip-10-138-162-6 ~ ] $ eksctl create cluster -f cluster.yaml -bash: eksctl: ...
2024/03/10
AWS Lambda Error:An error occurred (UnauthorizedOperation) when calling the AuthorizeSecurityGroupIngress operation: You are not authorized to perform this operation.
›
Problem 當我嘗試使用 Lambda function,增加一條 rule 至指定 security group 時,出現以下錯誤: Test Event Name MyTest Response null Function Logs START RequestId:...
2024/02/19
Using AWS CLI to Encrypt and Decrypt
›
上傳一個 plain text file 到 AWS CloudShell,並印出內容 [cloudshell-user@ip-10-130-78-240 ~]$ cat ExamplePlaintextFile.txt abc 123 test 建立一個 AWS ...
How to read Parameter Store values from Lambda function
›
已在 Parameter Store 建立兩個參數 已建立以下 Lambda function Code import boto3 import json def lambda_handler (event, context): # 初始化 SSM 客戶端 ...
Create AWS Lambda from CloudFormation
›
假設已準備好 yaml file,內容如下: AWSTemplateFormatVersion: '2010-09-09' Description: 'AWS CloudFormation Sample: AWS Lambda Functio...
AWS Lambda Alias
›
假設我有一支 Lambda function,內容如下: import json def lambda_handler (event, context): # TODO implement return { 'statusCo...
2024/02/17
如何透過 AWS Lambda 啟動/關閉 EC2
›
前置作業 假設我已經建立好一台 EC2 已準備一支用 Python 語法寫的 AWS Lambda function(當 EC2 是 Running 狀態時,就 Stop 它;當 EC2 是 Stopped 狀態時,就 Start 它) import boto3 # 初始...
2024/02/14
AWS S3 + CloudFront + OAI
›
步驟 1: Create S3 bucket 步驟 2: Upload a image file to S3 bucket 步驟 3: Create CloudFront distribution 與 使用 Origin Access Identity (OAI) 保護 S3 ...
›
Home
View web version