-
Notifications
You must be signed in to change notification settings - Fork 0
/
sam.yaml
executable file
·37 lines (37 loc) · 1.25 KB
/
sam.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: TravelBot
Resources:
BotApi:
Type: AWS::Serverless::Api
Properties:
StageName: prod
BinaryMediaTypes:
- '*/*'
TravelBotApiFunction:
Type: AWS::Serverless::Function
Properties:
Handler: by.vikhor.travelbot.appconfig.StreamLambdaHandler::handleRequest
Runtime: java11
CodeUri: s3://travel-bot-package/TravelBot/target/travelbot-0.0.1-SNAPSHOT-lambda-package.zip
MemorySize: 1512
Policies: AWSLambdaBasicExecutionRole
Role: arn:aws:iam::666899502235:role/service-role/VikhorTelegramBot-role-jo7bkryo
Timeout: 900
Environment:
Variables:
BOT_PORT: 8080
BOT_TOKEN: '1243361294:AAFk6iunCqkULr8z5D82dkidf2z3KPGJVYc'
BOT_USERNAME: '@vikhor_travel_bot'
API_URL: 'http://travelapi-env.eba-xmtprpjv.us-east-2.elasticbeanstalk.com'
Events:
Post:
Type: Api
Properties:
RestApiId: !Ref BotApi
Path: /
Method: POST
Outputs:
ProdDataEndpoint:
Description: "API prod stage endpoint"
Value: !Sub "https://${BotApi}.execute-api.${AWS::Region}.amazonaws.com/prod"