Я не думаю, что вы можете использовать какой-либо из существующих методов облачной информации s для этой цели.Вы можете использовать образец шаблона облачной информации, предоставляемый AWS.Вот пример шаблона Работа со строками , который предоставляет функции утилиты преобразования строк.Вы можете легко расширить метод python на любую нужную вам операцию.
CLI Команда для создания стеков (после их локальной загрузки)
aws cloudformation create-stack --stack-name testString --template-body file://string.yaml --profile your_profile --capabilities CAPABILITY_IAM
arn:aws:cloudformation:us-east-1:1234:stack/testString/ec34d8c0-9fc9-11e9-a0ed-0aa1af63e98c
aws cloudformation create-stack --stack-name testStringExample --template-body file://string_example.yaml --profile your_profile --capabilities CAPABILITY_AUTO_EXPAND
arn:aws:cloudformation:us-east-1:1234:stack/testStringExample/2047d720-9fca-11e9-ab63-12989ba5c57e
Создает s3ведро и добавляет различные преобразованные теги.Команда для проверки.
aws s3api get-bucket-tagging --bucket teststringexample-s3bucket-1dgnx05oslymu --profile your_profile --output json
{
"TagSet": [
{
"Value": "ring",
"Key": "ShortenLeft"
},
{
"Value": "his is a test input strin",
"Key": "Strip"
},
{
"Value": "THIS IS A TEST INPUT STRING",
"Key": "Upper"
},
{
"Value": "This_is_a_test_input_string",
"Key": "Replace"
},
{
"Value": "testStringExample",
"Key": "aws:cloudformation:stack-name"
},
{
"Value": "this is a test input string",
"Key": "Lower"
},
{
"Value": "This is a test input string",
"Key": "Capitalize"
},
{
"Value": "This Is A Test Input String",
"Key": "Title"
},
{
"Value": "S3Bucket",
"Key": "aws:cloudformation:logical-id"
},
{
"Value": "This",
"Key": "ShortenRight"
}
]
}