Delete all SSM parameters starting with /XYZ:
aws ssm get-parameters-by-path --path /XYZ --recursive --query 'Parameters[].[Name]' --output text | xargs -n1 -IParam aws ssm delete-parameter --name Param
Delete all SSM parameters starting with /XYZ:
aws ssm get-parameters-by-path --path /XYZ --recursive --query 'Parameters[].[Name]' --output text | xargs -n1 -IParam aws ssm delete-parameter --name Param
VAULT=<your vault here> | |
for ARN in $(aws backup list-recovery-points-by-backup-vault --backup-vault-name "$VAULT" --query 'RecoveryPoints[].RecoveryPointArn' --output text --region eu-west-1 --by-created-before 1672580151); do | |
echo "deleting $ARN" | |
aws backup delete-recovery-point --recovery-point-arn $ARN --region eu-west-1 --backup-vault-name "$VAULT" | |
done |
I need to edit a file in a Docker container. This container does not have vi or an actual editor. I cannot install anything. I don't have access to run chown either.
docker cp b28b1d60e423:/the/file/that.I.want.json .
id
)Thanks for attending our talk! This GIST lists resources we mention during our talk.
Merci d'avoir assisté à notre talk à PolyCloud !
Voici les ressources que nous avons mentionné:
aws sagemaker list-apps --query "Apps[?AppType=='KernelGateway' && Status=='InService']" | jq -r '.[] | "\(.AppName) \(.DomainId) \(.UserProfileName)"' | while read AppName DomainId UserProfileName; do echo Deleting $AppName for user $UserProfileName ... && aws sagemaker delete-app --domain-id $DomainId --app-type KernelGateway --app-name $AppName --user-profile $UserProfileName; done |
Minimal Docker image from AL2023 Amazon Linux 2023 (in this case, bash and its dependencies)
FROM public.ecr.aws/amazonlinux/amazonlinux:2023 as build
RUN dnf --releasever=$(rpm -q system-release --qf '%{VERSION}') \
--installroot /sysroot \
-y \
--setopt=install_weak_deps=False \
install bash