Skip to content

Commit

Permalink
glue resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Edujugon committed Aug 3, 2020
1 parent 2a51429 commit 57a0bfb
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions datapipeline/sls-glue-s3-rds/glue/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ custom:
Ref: 'AWS::AccountId'

params:
S3_BUCKET_NAME: ${self:custom.base}-s3-bucket
S3_BUCKET_NAME: ${cf:datapipeline-s3-${self:provider.stage}.GlueS3BucketName}
S3_BUCKET_ARN: ${cf:datapipeline-s3-${self:provider.stage}.GlueS3BucketARN}

GLUE_CRAWLER_ROLE_NAME: ${self:custom.base}IamRoleGlueCrawler
GLUE_JOB_ROLE_NAME: ${self:custom.base}IamRoleGlueJob
Expand Down Expand Up @@ -83,11 +84,12 @@ resources:
Effect: "Allow"
Action: "*"
Resource:
- Fn::GetAtt: [S3Bucket, Arn]
- ${self:custom.params.S3_BUCKET_ARN}
- 'Fn::Join':
- '/'
- - Fn::GetAtt: [S3Bucket, Arn]
- - ${self:custom.params.S3_BUCKET_ARN}
- '*'

GLUEJobRole:
Type: AWS::IAM::Role
Properties:
Expand Down Expand Up @@ -115,12 +117,6 @@ resources:
Action: "*"
Resource: "*"

S3Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: "${self:custom.params.S3_BUCKET_NAME}"
AccessControl: "BucketOwnerFullControl"

GLUEDatabase:
Type: AWS::Glue::Database
Properties:
Expand All @@ -138,8 +134,7 @@ resources:
Ref: GLUEDatabase
Targets:
S3Targets:
- Path:
Ref: S3Bucket
- Path: ${self:custom.params.S3_BUCKET_NAME}

GLUEConnection:
Type: AWS::Glue::Connection
Expand Down Expand Up @@ -178,4 +173,9 @@ resources:
ToPort: '65535'
SourceSecurityGroupId:
Ref: GlueConnectionSG


Outputs:
GlueConnectionSG:
Description: "Glue Connection SG"
Value:
Ref: GlueConnectionSG

0 comments on commit 57a0bfb

Please sign in to comment.