mirror of
https://github.com/gabehf/cloudcomputing-project.git
synced 2026-03-11 00:10:29 -07:00
first
This commit is contained in:
commit
70192929ca
36 changed files with 4188 additions and 0 deletions
157
template.yml
Normal file
157
template.yml
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
AWSTemplateFormatVersion: 2010-09-09
|
||||
Metadata:
|
||||
'AWS::CloudFormation::Designer':
|
||||
6892b949-4601-47eb-af8d-f584c12bc81b:
|
||||
size:
|
||||
width: 60
|
||||
height: 60
|
||||
position:
|
||||
x: 82
|
||||
'y': 299
|
||||
z: 0
|
||||
embeds: []
|
||||
80500ba5-1749-47bc-8cfa-3e9a0f0d0572:
|
||||
size:
|
||||
width: 60
|
||||
height: 60
|
||||
position:
|
||||
x: 200
|
||||
'y': 300
|
||||
z: 0
|
||||
embeds: []
|
||||
13c58f7b-60f4-4942-8731-d2b12e056e39:
|
||||
size:
|
||||
width: 60
|
||||
height: 60
|
||||
position:
|
||||
x: 340
|
||||
'y': 180
|
||||
z: 0
|
||||
embeds: []
|
||||
isassociatedwith:
|
||||
- d6f4bd86-a7e4-46c2-abab-2fd987e6a4f1
|
||||
- 792d4352-869b-4732-a0d2-d4bcc40a6b96
|
||||
dependson:
|
||||
- d6f4bd86-a7e4-46c2-abab-2fd987e6a4f1
|
||||
- 13c58f7b-60f4-4942-8731-d2b12e056e39
|
||||
792d4352-869b-4732-a0d2-d4bcc40a6b96:
|
||||
size:
|
||||
width: 60
|
||||
height: 60
|
||||
position:
|
||||
x: 460
|
||||
'y': 180
|
||||
z: 0
|
||||
embeds: []
|
||||
dependson:
|
||||
- 13c58f7b-60f4-4942-8731-d2b12e056e39
|
||||
3cf5efd5-85be-4593-b08b-bc3d4a6091b4:
|
||||
size:
|
||||
width: 60
|
||||
height: 60
|
||||
position:
|
||||
x: 340
|
||||
'y': 350
|
||||
z: 0
|
||||
embeds: []
|
||||
161bd476-b869-4c2e-968b-05cd0b73052f:
|
||||
size:
|
||||
width: 60
|
||||
height: 60
|
||||
position:
|
||||
x: 80
|
||||
'y': 220
|
||||
z: 0
|
||||
embeds: []
|
||||
isassociatedwith:
|
||||
- 80500ba5-1749-47bc-8cfa-3e9a0f0d0572
|
||||
Resources:
|
||||
URL:
|
||||
Type: 'AWS::Lambda::Url'
|
||||
Properties:
|
||||
AuthType: NONE
|
||||
TargetFunctionArn: !GetAtt
|
||||
- Server
|
||||
- Arn
|
||||
Metadata:
|
||||
'AWS::CloudFormation::Designer':
|
||||
id: 6892b949-4601-47eb-af8d-f584c12bc81b
|
||||
DependsOn:
|
||||
- Server
|
||||
Server:
|
||||
Type: 'AWS::Lambda::Function'
|
||||
Properties:
|
||||
FunctionName: Server
|
||||
Handler: index.handler
|
||||
Runtime: nodejs16.x
|
||||
Code:
|
||||
S3Bucket: ${bucketname}
|
||||
S3Key: index.zip
|
||||
Role: !GetAtt SiteRole.Arn
|
||||
Metadata:
|
||||
'AWS::CloudFormation::Designer':
|
||||
id: 80500ba5-1749-47bc-8cfa-3e9a0f0d0572
|
||||
DependsOn:
|
||||
- SiteRole
|
||||
SiteRole:
|
||||
Type: 'AWS::IAM::Role'
|
||||
Properties:
|
||||
AssumeRolePolicyDocument:
|
||||
Version: 2012-10-17
|
||||
Statement:
|
||||
- Effect: Allow
|
||||
Principal:
|
||||
Service:
|
||||
- lambda.amazonaws.com
|
||||
Action: 'sts:AssumeRole'
|
||||
ManagedPolicyArns:
|
||||
- 'arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess'
|
||||
RoleName: SiteRole
|
||||
Metadata:
|
||||
'AWS::CloudFormation::Designer':
|
||||
id: 13c58f7b-60f4-4942-8731-d2b12e056e39
|
||||
ExecPolicy:
|
||||
Type: 'AWS::IAM::Policy'
|
||||
Properties:
|
||||
PolicyName: LambdaExcecutionPolicy
|
||||
PolicyDocument:
|
||||
Version: 2012-10-17
|
||||
Statement:
|
||||
- Effect: Allow
|
||||
Action:
|
||||
- 'logs:CreateLogGroup'
|
||||
- 'logs:CreateLogStream'
|
||||
- 'logs:PutLogEvents'
|
||||
Resource: '*'
|
||||
Roles:
|
||||
- !Ref SiteRole
|
||||
Metadata:
|
||||
'AWS::CloudFormation::Designer':
|
||||
id: 792d4352-869b-4732-a0d2-d4bcc40a6b96
|
||||
DependsOn:
|
||||
- SiteRole
|
||||
MusicTable:
|
||||
Type: 'AWS::DynamoDB::Table'
|
||||
Properties:
|
||||
KeySchema:
|
||||
- AttributeName: id
|
||||
KeyType: HASH
|
||||
AttributeDefinitions:
|
||||
- AttributeName: id
|
||||
AttributeType: S
|
||||
BillingMode: PAY_PER_REQUEST
|
||||
TableName: MusicTable
|
||||
Metadata:
|
||||
'AWS::CloudFormation::Designer':
|
||||
id: 3cf5efd5-85be-4593-b08b-bc3d4a6091b4
|
||||
Permission:
|
||||
Type: 'AWS::Lambda::Permission'
|
||||
Properties:
|
||||
Action: 'lambda:invokeFunctionUrl'
|
||||
FunctionUrlAuthType: 'NONE'
|
||||
FunctionName: !Ref Server
|
||||
Principal: '*'
|
||||
Metadata:
|
||||
'AWS::CloudFormation::Designer':
|
||||
id: 161bd476-b869-4c2e-968b-05cd0b73052f
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue