template.yaml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. AWSTemplateFormatVersion: '2010-09-09'
  2. Transform: 'AWS::Serverless-2016-10-31'
  3. Description: >-
  4. An Amazon S3 trigger that retrieves metadata for the object that has been
  5. updated.
  6. Resources:
  7. ambtiparktowerrawtoprepbucketlambda:
  8. Type: 'AWS::Serverless::Function'
  9. Properties:
  10. FunctionName: ambt-iparktower-raw-to-prep-dev-v1
  11. Handler: lambda_function.lambda_handler
  12. Runtime: python3.8
  13. CodeUri: .
  14. Description: >-
  15. An Amazon S3 trigger that retrieves metadata for the object that has
  16. been updated.
  17. MemorySize: 128
  18. Timeout: 60
  19. Role: 'arn:aws:iam::314854109580:role/ambt-anoicos-lambda-role-dev'
  20. Events:
  21. BucketEvent1:
  22. Type: S3
  23. Properties:
  24. Bucket:
  25. Ref: Bucket1
  26. Events:
  27. - 's3:ObjectCreated:*'
  28. Filter:
  29. S3Key:
  30. Rules:
  31. - Name: prefix
  32. Value: dev/site_name%3Dipark_tower/
  33. - Name: suffix
  34. Value: .csv
  35. VpcConfig:
  36. SecurityGroupIds:
  37. - sg-004b2ab1a1236c38a
  38. - sg-0c06df8f1801f1223
  39. SubnetIds:
  40. - subnet-085e7dbb921a37896
  41. - subnet-08c7f7957ac229a39
  42. - subnet-093c720e80523ae87
  43. - subnet-096b6165c35976bed
  44. Tags:
  45. 'lambda-console:blueprint': s3-get-object-python
  46. LambdaInvocationPermission:
  47. Type: AWS::Lambda::Permission
  48. Properties:
  49. SourceArn: 'arn:aws:s3:::hdci-ambt-icos-raw'
  50. Action: lambda:InvokeFunction
  51. Principal: s3.amazonaws.com
  52. FunctionName: !GetAtt ambtiparktowerrawtoprepbucketlambda.Arn
  53. SourceAccount: !Ref AWS::AccountId
  54. Bucket1:
  55. Type: 'AWS::S3::Bucket'