This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: localhost | |
vars: | |
aurora_cluster_name: mycoolauroracluster | |
aurora_cluster_engine: aurora-mysql | |
aurora_cluster_version: 5.7.12 | |
aws_region: ap-southeast-2 | |
tasks: | |
- name: look for an existing Aurora cluster using the AWS CLI | |
command: > |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# describing a non-existent Aurora cluster results in an error | |
$ aws rds describe-db-clusters --db-cluster-identifier doesnotexist | |
An error occurred (DBClusterNotFoundFault) when calling the DescribeDBClusters operation: DBCluster doesnotexist not found. | |
# but using --filter to describe a non-existent Aurora cluster is ok | |
$ aws rds describe-db-clusters --filters Name=db-cluster-id,Values=doesnotexist | |
{ | |
"DBClusters": [] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"ssm:GetParameter", | |
"ssm:GetParameters" | |
], | |
"Resource": "arn:aws:ssm:{region}:{account-id}:parameter/build-number/*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
const ssm = new AWS.SSM(); | |
exports.handler = async (event) => { | |
const parameterName = '/build-number/' + event['detail']['project-name']; | |
const getBuildNumberParams = { | |
Name: parameterName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"ssm:GetParameter", | |
"ssm:GetParameters", | |
"ssm:PutParameter" | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
THROTTLE_PENALTY_FACTOR = 0.5 | |
STEERING_PENALTY_FACTOR = 0.5 | |
def reward_function(on_track, x, y, distance_from_center, car_orientation, progress, steps, throttle, steering, track_width, waypoints, closest_waypoint): | |
''' | |
@on_track (boolean) :: The vehicle is off-track if the front of the vehicle is outside of the white | |
lines | |
@x (float range: [0, 1]) :: Fraction of where the car is along the x-axis. 1 indicates | |
max 'x' value in the coordinate system. |
OlderNewer