Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save cagingulsen/e39740f65b7bb95bff0061c718035909 to your computer and use it in GitHub Desktop.

Select an option

Save cagingulsen/e39740f65b7bb95bff0061c718035909 to your computer and use it in GitHub Desktop.
A code section of AWS CDK bootstrap template
Description: This stack includes resources needed to deploy AWS CDK apps into this
environment
Parameters:
.
.
.
.
.
PublicAccessBlockConfiguration:
Description: Whether or not to enable S3 Staging Bucket Public Access Block Configuration
Default: 'true'
Type: 'String'
AllowedValues: ['true', 'false']
PermissionsBoundaryArn:
Description: ARN of the Permissions Boundary
Type: 'String'
Conditions:
HasTrustedAccounts:
Fn::Not:
- Fn::Equals:
- ''
- Fn::Join:
- ''
- Ref: TrustedAccounts
.
.
.
.
Resources:
.
.
.
.
FilePublishingRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
AWS:
Ref: AWS::AccountId
- Fn::If:
- HasTrustedAccounts
- Action: sts:AssumeRole
Effect: Allow
Principal:
AWS:
Ref: TrustedAccounts
- Ref: AWS::NoValue
RoleName:
Fn::Sub: cdk-${Qualifier}-file-publishing-role-${AWS::AccountId}-${AWS::Region}
PermissionsBoundary: !Ref PermissionsBoundaryArn
Tags:
- Key: aws-cdk:bootstrap-role
Value: file-publishing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment