Skip to content

Commit

Permalink
Merge branch 'master' into chaimber/opensearch_rebrand_appsync
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Mar 11, 2022
2 parents 33f9555 + a9e286e commit 0aa53a6
Show file tree
Hide file tree
Showing 15 changed files with 553 additions and 435 deletions.
4 changes: 3 additions & 1 deletion packages/@aws-cdk/aws-cloudfront/lib/distribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ export class Distribution extends Resource implements IDistribution {
throw new Error('Explicitly disabled logging but provided a logging bucket.');
}

const bucket = props.logBucket ?? new s3.Bucket(this, 'LoggingBucket');
const bucket = props.logBucket ?? new s3.Bucket(this, 'LoggingBucket', {
encryption: s3.BucketEncryption.S3_MANAGED,
});
return {
bucket: bucket.bucketRegionalDomainName,
includeCookies: props.logIncludesCookies,
Expand Down
4 changes: 3 additions & 1 deletion packages/@aws-cdk/aws-cloudfront/lib/web-distribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,9 @@ export class CloudFrontWebDistribution extends cdk.Resource implements IDistribu
}

if (props.loggingConfig) {
this.loggingBucket = props.loggingConfig.bucket || new s3.Bucket(this, 'LoggingBucket');
this.loggingBucket = props.loggingConfig.bucket || new s3.Bucket(this, 'LoggingBucket', {
encryption: s3.BucketEncryption.S3_MANAGED,
});
distributionConfig = {
...distributionConfig,
logging: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@
},
"AnAmazingWebsiteProbably2LoggingBucket222F7CE9": {
"Type": "AWS::S3::Bucket",
"Properties": {
"BucketEncryption": {
"ServerSideEncryptionConfiguration": [
{
"ServerSideEncryptionByDefault": {
"SSEAlgorithm": "AES256"
}
}
]
}
},
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
"Resources": {
"MyDistLoggingBucket9B8976BC": {
"Type": "AWS::S3::Bucket",
"Properties": {
"BucketEncryption": {
"ServerSideEncryptionConfiguration": [
{
"ServerSideEncryptionByDefault": {
"SSEAlgorithm": "AES256"
}
}
]
}
},
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
},
Expand Down
26 changes: 20 additions & 6 deletions packages/@aws-cdk/aws-stepfunctions-tasks/lib/batch/submit-job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,23 +291,37 @@ export class BatchSubmitJob extends sfn.TaskStateBase {
);
}

let resources;
let resources: Array<any> = [];
if (containerOverrides.gpuCount) {
resources = [
resources.push(
{
Type: 'GPU',
Value: `${containerOverrides.gpuCount}`,
},
];
);
}
if (containerOverrides.memory) {
resources.push(
{
Type: 'MEMORY',
Value: `${containerOverrides.memory.toMebibytes()}`,
},
);
}
if (containerOverrides.vcpus) {
resources.push(
{
Type: 'VCPU',
Value: `${containerOverrides.vcpus}`,
},
);
}

return {
Command: containerOverrides.command,
Environment: environment,
InstanceType: containerOverrides.instanceType?.toString(),
Memory: containerOverrides.memory?.toMebibytes(),
ResourceRequirements: resources,
Vcpus: containerOverrides.vcpus,
ResourceRequirements: resources.length ? resources : undefined,
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@
"AutoDeploy": true
}
},
"MyHttpApiANYDefaultIntegration5FAD8850": {
"Type": "AWS::ApiGatewayV2::Integration",
"Properties": {
"ApiId": {
"Ref": "MyHttpApi8AEAAC21"
},
"IntegrationType": "AWS_PROXY",
"IntegrationUri": {
"Fn::GetAtt": [
"HelloHandler2E4FBA4D",
"Arn"
]
},
"PayloadFormatVersion": "2.0"
}
},
"MyHttpApiANYDefaultIntegrationPermissionAB8301EF": {
"Type": "AWS::Lambda::Permission",
"Properties": {
Expand Down Expand Up @@ -54,22 +70,6 @@
}
}
},
"MyHttpApiANYDefaultIntegration5FAD8850": {
"Type": "AWS::ApiGatewayV2::Integration",
"Properties": {
"ApiId": {
"Ref": "MyHttpApi8AEAAC21"
},
"IntegrationType": "AWS_PROXY",
"IntegrationUri": {
"Fn::GetAtt": [
"HelloHandler2E4FBA4D",
"Arn"
]
},
"PayloadFormatVersion": "2.0"
}
},
"MyHttpApiANYC3543576": {
"Type": "AWS::ApiGatewayV2::Route",
"Properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@
},
"StageName": "prod"
},
"DependsOn": ["MyRestApiAccount2FB6DB7A"]
"DependsOn": [
"MyRestApiAccount2FB6DB7A"
]
},
"MyRestApiANYApiPermissionCallRestApiIntegMyRestApiB570839CANY0C27C1E3": {
"Type": "AWS::Lambda::Permission",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@
"vpcPublicSubnet1NATGateway9C16659E": {
"Type": "AWS::EC2::NatGateway",
"Properties": {
"SubnetId": {
"Ref": "vpcPublicSubnet1Subnet2E65531E"
},
"AllocationId": {
"Fn::GetAtt": [
"vpcPublicSubnet1EIPDA49DCBE",
"AllocationId"
]
},
"SubnetId": {
"Ref": "vpcPublicSubnet1Subnet2E65531E"
},
"Tags": [
{
"Key": "Name",
Expand Down Expand Up @@ -192,15 +192,15 @@
"vpcPublicSubnet2NATGateway9B8AE11A": {
"Type": "AWS::EC2::NatGateway",
"Properties": {
"SubnetId": {
"Ref": "vpcPublicSubnet2Subnet009B674F"
},
"AllocationId": {
"Fn::GetAtt": [
"vpcPublicSubnet2EIP9B3743B1",
"AllocationId"
]
},
"SubnetId": {
"Ref": "vpcPublicSubnet2Subnet009B674F"
},
"Tags": [
{
"Key": "Name",
Expand Down Expand Up @@ -289,15 +289,15 @@
"vpcPublicSubnet3NATGateway82F6CA9E": {
"Type": "AWS::EC2::NatGateway",
"Properties": {
"SubnetId": {
"Ref": "vpcPublicSubnet3Subnet11B92D7C"
},
"AllocationId": {
"Fn::GetAtt": [
"vpcPublicSubnet3EIP2C3B9D91",
"AllocationId"
]
},
"SubnetId": {
"Ref": "vpcPublicSubnet3Subnet11B92D7C"
},
"Tags": [
{
"Key": "Name",
Expand Down Expand Up @@ -514,45 +514,20 @@
}
}
},
"ComputeEnvEcsInstanceRoleCFB290F9": {
"Type": "AWS::IAM::Role",
"ComputeEnvResourceSecurityGroupB84CF86B": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": {
"Fn::Join": [
"",
[
"ec2.",
{
"Ref": "AWS::URLSuffix"
}
]
]
}
}
}
],
"Version": "2012-10-17"
},
"ManagedPolicyArns": [
"GroupDescription": "aws-stepfunctions-integ/ComputeEnv/Resource-Security-Group",
"SecurityGroupEgress": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role"
]
]
"CidrIp": "0.0.0.0/0",
"Description": "Allow all outbound traffic by default",
"IpProtocol": "-1"
}
]
],
"VpcId": {
"Ref": "vpcA2121C38"
}
},
"DependsOn": [
"vpcIGWE57CBDCA",
Expand Down Expand Up @@ -590,12 +565,43 @@
"vpcVPCGW7984C166"
]
},
"ComputeEnvInstanceProfile81AFCCF2": {
"Type": "AWS::IAM::InstanceProfile",
"ComputeEnvEcsInstanceRoleCFB290F9": {
"Type": "AWS::IAM::Role",
"Properties": {
"Roles": [
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": {
"Fn::Join": [
"",
[
"ec2.",
{
"Ref": "AWS::URLSuffix"
}
]
]
}
}
}
],
"Version": "2012-10-17"
},
"ManagedPolicyArns": [
{
"Ref": "ComputeEnvEcsInstanceRoleCFB290F9"
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role"
]
]
}
]
},
Expand Down Expand Up @@ -635,20 +641,14 @@
"vpcVPCGW7984C166"
]
},
"ComputeEnvResourceSecurityGroupB84CF86B": {
"Type": "AWS::EC2::SecurityGroup",
"ComputeEnvInstanceProfile81AFCCF2": {
"Type": "AWS::IAM::InstanceProfile",
"Properties": {
"GroupDescription": "aws-stepfunctions-integ/ComputeEnv/Resource-Security-Group",
"SecurityGroupEgress": [
"Roles": [
{
"CidrIp": "0.0.0.0/0",
"Description": "Allow all outbound traffic by default",
"IpProtocol": "-1"
"Ref": "ComputeEnvEcsInstanceRoleCFB290F9"
}
],
"VpcId": {
"Ref": "vpcA2121C38"
}
]
},
"DependsOn": [
"vpcIGWE57CBDCA",
Expand Down Expand Up @@ -755,12 +755,6 @@
"ComputeEnv2C40ACC2": {
"Type": "AWS::Batch::ComputeEnvironment",
"Properties": {
"ServiceRole": {
"Fn::GetAtt": [
"ComputeEnvResourceServiceInstanceRoleCF89E9E1",
"Arn"
]
},
"Type": "MANAGED",
"ComputeResources": {
"AllocationStrategy": "BEST_FIT",
Expand Down Expand Up @@ -796,6 +790,12 @@
],
"Type": "EC2"
},
"ServiceRole": {
"Fn::GetAtt": [
"ComputeEnvResourceServiceInstanceRoleCF89E9E1",
"Arn"
]
},
"State": "ENABLED"
},
"DependsOn": [
Expand Down Expand Up @@ -876,8 +876,14 @@
"Privileged": false,
"ReadonlyRootFilesystem": false,
"ResourceRequirements": [
{ "Type": "VCPU", "Value": "1" },
{ "Type": "MEMORY", "Value": "4" }
{
"Type": "VCPU",
"Value": "1"
},
{
"Type": "MEMORY",
"Value": "4"
}
]
},
"PlatformCapabilities": [
Expand Down
Loading

0 comments on commit 0aa53a6

Please sign in to comment.