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
import json | |
import sagemaker | |
import boto3 | |
from sagemaker.huggingface import HuggingFaceModel, get_huggingface_llm_image_uri | |
try: | |
role = sagemaker.get_execution_role() | |
except ValueError: | |
iam = boto3.client('iam') | |
role = iam.get_role(RoleName='sagemaker_execution_role')['Role']['Arn'] |
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 pipeline = new cdk.aws_codepipeline.Pipeline(this, "Pipeline", { | |
role: pipelineRole, | |
restartExecutionOnUpdate: true, | |
enableKeyRotation: true, | |
}); | |
pipeline.addStage({ | |
stageName: "Get_Source", | |
actions: [ | |
new cdk.aws_codepipeline_actions.CodeStarConnectionsSourceAction({ |
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
#!/bin/bash | |
warning_list="" | |
RED="\033[0;31m" | |
NC="\033[0m" | |
for target_group in $(aws elbv2 describe-target-groups --query "TargetGroups[?starts_with(TargetGroupName, 'serverless-')].TargetGroupArn" --output text) | |
do | |
echo "---------------------------------------" |
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
export aggregator="REPLACE_WITH_YOUR_AGGREGATOR_NAME" | |
export query="SELECT accountId, configuration.instancdId, configuration.publicIp, configuration.ipv6Addresses WHERE resourceType = 'AWS::EC2::Instance' AND (configuration.publicIp BETWEEN '0.0.0.0' AND '255.255.255.255' OR configuration.ipv6Addresses BETWEEN '0:0:0:0:0:0:0:0' AND 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff')" | |
aws configservice select-aggregate-resource-config --expression $query --configuration-aggregator-name $aggregator |
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
SELECT | |
accountId, | |
configuration.instancdId, | |
configuration.publicIp, | |
configuration.ipv6Addresses | |
WHERE | |
resourceType = 'AWS::EC2::Instance' | |
AND ( | |
configuration.publicIp BETWEEN '0.0.0.0' | |
AND '255.255.255.255' |
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
import os | |
import json | |
import logging | |
import time | |
import boto3 | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
sts_client = boto3.client("sts") |
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
--- | |
- name: Delete old jira node operation records from replicatedindexoperation table | |
postgresql_query: | |
login_host: "{{ atl_db_host }}" | |
port: "{{ atl_db_port }}" | |
login_user: "{{ atl_db_root_user }}" | |
login_password: "{{ atl_db_root_password }}" | |
db: "{{ atl_jdbc_db_name }}" | |
query: DELETE FROM replicatedindexoperation AS Rep WHERE Rep.node_id NOT IN (SELECT node_id from clusternode) |
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
--- | |
- name: Wait for index files folder ready | |
wait_for: | |
path: "{{ atl_product_home }}/caches/indexesV1" | |
delay: 60 | |
sleep: 10 | |
timeout: 120 | |
ignore_errors: yes | |
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
- name: Install dependencies for snappy | |
yum: | |
name: | |
- gcc | |
- gcc-c++ | |
- automake | |
- snappy | |
- snappy-devel | |
- git | |
when: atl_product_family == "jira" |
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": [ | |
{ | |
"Sid": "MyTestDataBucketReadAccess", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": [ |
NewerOlder