Skip to content

Instantly share code, notes, and snippets.

@nivleshc
Created August 25, 2019 06:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nivleshc/bd69c05fc879f79a26443ac62c429612 to your computer and use it in GitHub Desktop.
Save nivleshc/bd69c05fc879f79a26443ac62c429612 to your computer and use it in GitHub Desktop.
resources:
Description: Transport Positioning System Resources
Resources:
websiteBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:custom.s3.websiteBucket}
#DynamoDB will be used to store the label that each transport will be given.
#The label will be used as the pushpin label on the map.
#DynamoDB will have attributes TripDate, TripId, VehicleId, ExpirationTime(TTL),
#TimeAdded, Latitude, Longitude, PushpinLabel, PushPinLabelDescr
transportPositionTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: ${self:custom.dynamodb.transportPositionTableName}
AttributeDefinitions:
- AttributeName: TripDate
AttributeType: S
- AttributeName: VehicleId
AttributeType: S
KeySchema:
- AttributeName: TripDate
KeyType: HASH
- AttributeName: VehicleId
KeyType: RANGE
BillingMode: ${self:custom.dynamodb.billingMode}
GlobalSecondaryIndexes:
- IndexName: TripDate-GSI
KeySchema:
- AttributeName: TripDate
KeyType: HASH
Projection:
ProjectionType: ALL
TimeToLiveSpecification:
AttributeName: ExpirationTime
Enabled: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment