Skip to content

Commit

Permalink
👍 create sqs and lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
shun198 committed Aug 27, 2024
1 parent 4e6fcb6 commit 13a58f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
5 changes: 5 additions & 0 deletions templates/lambda/functions/sample/lambda_function.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
def lambda_handler(event, context) -> str:
"""Lambdaのエントリーポイント
"""
print(event["Records"][0]["body"])
return "finish lambda"
14 changes: 0 additions & 14 deletions templates/lambda/lambda-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ Metadata:
- Label:
default: "Lambda Configuration"
Parameters:
- LambdaProtectedSubnet1
- LambdaProtectedSubnet2
- LambdaSecurityGroupID
- LambdaArchiveBucketName
- LambdaArchiveBucketObjectKey
- ParametersSecretsLambdaExtensionArn
- Handler
- MemorySize
- Timeout
Expand Down Expand Up @@ -50,11 +46,6 @@ Parameters:
LambdaArchiveBucketObjectKey:
Description: "Enter the S3 bucket object key for Lambda zip archive."
Type: String
# @see https://docs.aws.amazon.com/ja_jp/systems-manager/latest/userguide/ps-integration-lambda-extensions.html#ps-integration-lambda-extensions-add
ParametersSecretsLambdaExtensionArn:
Description: "Enter the Lambda Extension ARN for AWS Parameters and Secrets."
Type: String
Default: arn:aws:lambda:ap-northeast-1:133490724326:layer:AWS-Parameters-and-Secrets-Lambda-Extension:11
Handler:
Description: "Enter the Lambda function name to delete data. (default: lambda_function.lambda_handler)"
Type: String
Expand Down Expand Up @@ -93,8 +84,6 @@ Resources:
Code:
S3Bucket: !Ref LambdaArchiveBucketName
S3Key: !Ref LambdaArchiveBucketObjectKey
Layers:
- !Ref ParametersSecretsLambdaExtensionArn
FunctionName: !Sub ${ProjectName}-${Environment}
Description: "サンプル用Lambda 関数"
Handler: !Ref Handler
Expand Down Expand Up @@ -147,9 +136,6 @@ Resources:
- ec2:CreateNetworkInterface
- ec2:DescribeNetworkInterfaces
- ec2:DeleteNetworkInterface
- ssm:GetParameter
- ssm:GetParameters
- kms:Decrypt
Resource: "*"
- Effect: Allow
Action: logs:CreateLogGroup
Expand Down

0 comments on commit 13a58f9

Please sign in to comment.