Фоторепортаж на “Биволъ” “Открито: забранено за политици”: Журналистката Валя Ахчиева представи книгата си

Post Syndicated from Николай Марченко original https://bivol.bg/valya-ahchieva-zabraneno-za-politici.html

събота 2 ноември 2024


Разследващата журналистка Валя Ахчиева представи книгата си “Открито: забранено за политици” на специално тържество, състояло се в петък, на 1 ноември 2024 г., в Деня на народните будители, във Военния…

Седмицата (28 октомври – 2 ноември)

Post Syndicated from Йовко Ламбрев original https://www.toest.bg/sedmitsata-28-oktomvri-2-noemvri/

Седмицата (28 октомври – 2 ноември)

Една от големите промени, които донесе падането на социалистическия блок, беше връщането на възможността свободно да избираме управляващите. Защо 35 години по-късно хората отказват да използват това право, е тема на сложен и нееднозначен разговор. Сега обаче е на дневен ред да се обясни на тези хора, че отказът да гласуват или да не подкрепят никого не е бунт, а робство. Не е отмъщение, а самобичуване. И не е безразличие, а жертвоприношение. А на дръвника е бъдещето и на тези след нас.

Разбира се, че политическият елит винаги носи основната вина за това развитие, но съучастници сме гласоподавателите, особено пасивните. Защото нещата са свързани. Само заедно можем да скъсаме омагьосания кръг.

Светла Енчева обаче защитава тезата, че са нужни много повече усилия от това политиците да опознаят електората си, и в статията си „Слаби амбиции, непознаване на избирателите – мижав резултат“ подсказва възможни решения, правейки паралели с кампанията и изборите отвъд океана. Разбира се, че политическите традиции и контекстът са доста различни, но някои механизми са проверени и доказали своята ефективност.

Кой е по-голям от Пеевски“, твърди Емилия Милчева в седмичния си политически анализ. Твърдение е, а не въпрос, защото много въпросителни по тази тема не са останали. Всичко така прозира на повърхността, че широко затворените очи на институции и елит са видими дори от хора с тежко късогледство. Според Емилия гордиевият възел на българския политически блокаж може да се разсече само със смелост. Или с ярост, ако се доверим на историческите метафори. Но предвид обстоятелствата сякаш е по-добре да не опираме до нея.

Хелоуин за пореден път предизвика полемика в обществото, но тази година агресията в общуването ни по темата сякаш нарасна – дори от страна на хора на улицата спрямо непознати родители на деца, излезли една вечер да се забавляват в костюми. Колко ужасен всъщност е Хелоуин и наистина ли заплашва българските ценности и традиции? Александър Драганов ни превежда през българската история на хорър жанра и коментира съвместимостта ѝ с американския (а всъщност ирландски) празник.

Николета Атанасова продължава поредицата си „Несломимата Украйна“ с нов разказ от Рехабилитационния център Unbroken в Лвов, където се среща и разговаря с проф. д-р Олег Билянски – физиотерапевт, който лекува тежко осакатени украински ветерани от войната с Русия. „Несломените“ е заглавието на новия текст на Николета, а последното изречение в него е за обичта. Прочетете защо.

Приобщаващото образование на учениците с различни нужди или с увреждания е тема на новия материал на Надежда Цекулова в поредицата „Разговори за образованието“. Този път тя разговаря със Сара Краус от Университета в Мериленд, която споделя опита си в тази сфера и разказва за предизвикателствата и възможните решения на проблемите, пред които се изправят тези деца и техните учители. Прочетете повече в „Приобщаващото образование – мисията (почти) възможна“.

Ако всяко второ нещо е уникално, значи нищо не е уникално. Това е една от думите, с които толкова се прекалява напоследък, че у мен лично предизвиква гадене. И не е само тя. Замисляли ли сте се колко уязвими са думите и как ги изхабяваме с неуместна или прекомерна употреба? Точно това е темата на новата статия на Павлина Върбанова в поредицата „Порция език“. Не пропускайте да прочетете „Уморените думи ги убиват – дали?“.

Не може да оставим седмицата да си отиде, без да споделим впечатления и за някоя хубава книга. Този път Стефан Иванов е свалил от рафта на по-отдавна издадените заглавия книгата на Дилян Еленков, озаглавена предизвикателно „Нека забравим тези разкази“. Разбира се, Стефан ни призовава тъкмо към обратното. Защото в тях са първите години на новото хилядолетие, детството на века ни, но и собственото ни детство… И защото:

Има воля да се види чуждият смисъл, да се навлезе до шия в съчувствие и състрадание, да се скочи в дълбокото и страшното, в безизходното на живота и да се извади оттам каквото е открито, за да бъде споделено.

И накрая – една новина за развитието на „Тоест“. Както знаете, медията ни се издържа само с читателски дарения (с изключение на две-три малки проектни финансирания за конкретни поредици). През годините сме насочвали средствата приоритетно за създаване на съдържание, пестеливо за организационни нужди и… нищо за маркетинг. Разчитали сме изцяло на органичния растеж. А това в съвременния динамичен дигитален свят ни обрича на маргиналност.

Тази година кандидатствахме и спечелихме целево финансиране по програма CEMP на международната организация Zinc Network. Едногодишният ни проект е с ясно разпределен бюджет само за маркетингови дейности и кампании в социалните мрежи, а неговата цел е да ни помогне да увеличим аудиторията си и оттам – директната подкрепа от читателите. Защото упорито не се отказваме от вярата, че именно малките, но редовни читателски дарения осигуряват пълната редакционна независимост. И че безкомпромисността на качеството, което „Тоест“ предоставя, може да бъде оценена от много повече хора.

В тази посока работим в чудесно сътрудничество с маркетинговата агенция „Портокалена“ и дизайнерското студио „Две кучета две котки“. За наша голяма радост, те притежават не само безупречния професионален опит и капацитет, но и така нужната гражданска чувствителност и готовност да излизат извън обичайните клишета. Очаквайте съвсем скоро много обновления във визията и комуникацията на „Тоест“, а ние ще се радваме на всяка обратна връзка от вас.

Със средствата по този проект не можем да финансираме създаването на съдържание, а със средствата, дарени от нашите критични и верни читатели, няма да плащаме за маркетинг и реклама. Затова продължаваме да разчитаме изцяло на вас, за да осигурим достойно заплащане на труда на екипа и да покрием базовите административни и технически нужди.

Fine-tuning for Anthropic’s Claude 3 Haiku model in Amazon Bedrock is now generally available

Post Syndicated from Channy Yun (윤석찬) original https://aws.amazon.com/blogs/aws/fine-tuning-for-anthropics-claude-3-haiku-model-in-amazon-bedrock-is-now-generally-available/

Today, we are announcing the general availability of fine-tuning for Anthropic’s Claude 3 Haiku model in Amazon Bedrock in the US West (Oregon) AWS Region. Amazon Bedrock is the only fully managed service that provides you with the ability to fine-tune Claude models. You can now fine-tune and customize the Claude 3 Haiku model with your own task-specific training dataset to boost model accuracy, quality, and consistency to further tailor generative AI for your business.

Fine-tuning is a technique where a pre-trained large language model (LLM) is customized for a specific task by updating the weights and tuning hyperparameters like learning rate and batch size for optimal results.

Anthropic’s Claude 3 Haiku model is the fastest and most compact model in the Claude 3 model family. Fine-tuning Claude 3 Haiku offers significant advantages for businesses:

  • Customization – You can customize models that excel in areas crucial to your business compared to more general models by encoding company and domain knowledge.
  • Specialized performance – You can generate higher quality results and create unique user experiences that reflect your company’s proprietary information, brand, products, and more.
  • Task-specific optimization – You can enhance performance for domain-specific actions such as classification, interactions with custom APIs, or industry-specific data interpretation.
  • Data security – You can fine-tune with peace of mind in your secure AWS environment. Amazon Bedrock makes a separate copy of the base foundation model that is accessible only by you and trains this private copy of the model.

You can now optimize performance for specific business use cases by providing domain-specific labeled data to fine-tune the Claude 3 Haiku model in Amazon Bedrock.

In early 2024, we started to engage customers with a team of experts from the AWS Generative AI Innovation Center to help fine-tune Anthropic’s Claude models with their proprietary data sources. I’m happy to share that you can now fine-tune Anthropic’s Claude 3 Haiku model in Amazon Bedrock directly in the Amazon Bedrock console.

Get started with fine-tuning for Anthropic’s Claude 3 Haiku model in Amazon Bedrock
I will demonstrate how to easily fine-tune the Claude 3 Haiku model in Amazon Bedrock. To learn more about the fine-tuning workflow in detail, visit the AWS Machine Learning Blog post, Fine-tune Anthropic’s Claude 3 Haiku in Amazon Bedrock to boost model accuracy and quality.

To create a simple fine-tuning job in the Amazon Bedrock console, go to the Foundation models section in the navigation pane and select Custom models. In the Models section, select the Customize model button and then select Create Fine-tuning job.

Next, choose the model that you want to customize with your own data, give your resulting model a name, and optionally add encryption keys and any tags to associate with the model in the Model details section. Enter a name for the job and optionally add any tags for the job in the Job configuration section.

You can select the Amazon S3 location of the training dataset file and, if applicable, the validation dataset file in the Input data section.

Each dataset can be created using a JSON Lines (JSONL) file with multiple JSON lines using the single-turn or multi-turn messaging format. Each JSON line is a sample containing a system and message, an array of message objects.

I prepared some of the latest information about Anthropic’s Claude 3.5 Sonnet model in Amazon Bedrock. To learn more, visit Prepare the datasets in the Amazon Bedrock documentation.

{"system": "You are an helpful assistant.","messages":[{"role": "user", "content": "What’s the latest models to support Amazon Bedrock"},{"role": "assistant", "content": "Amazon Bedrock is a fully managed service that support Anthropic’s Claude 3 Sonnet, Haiku, and Opus models and the latest Claud 3.5 Sonnet model."}]}
{"system": "You are an helpful assistant.","messages":[{"role": "user", "content": "How long context window of Claude 3.5?"},{"role": "assistant", "content": "Anthropic's Claude 3 models have a 200,000 token context window enabling you to relay a large volume of information to Claude. This translates to roughly 150,000 words, or over 500 pages of material."}]}
{"system": "You are an helpful assistant.","messages":[{"role": "user", "content": "Is Claude 3.5 available in Bedrock?"},{"role": "assistant", "content": "Anthropic’s most intelligent and advanced model, Claude 3.5 Sonnet, demonstrates exceptional capabilities across a diverse range of tasks and evaluations while also outperforming Claude 3 Opus."}]}

In the Hyperparameters section, enter values for hyperparameters to use in training, such as epochs, batch size, and learning rate multiplier. If you’ve included a validation dataset, you can enable Early stopping, a technique used to prevent overfitting and stop the training process when the validation loss stops improving. You can set an early stopping threshold and patience value.

You can also select the output location where Amazon Bedrock should save the output of the job in the Output data section. Choose an AWS Identity and Access Management (IAM) custom service role with the appropriate permissions in the Service access section. To learn more, see Create a service role for model customization in the Amazon Bedrock documentation.

Finally, choose Create Fine-tuning job and wait for your fine-tuning job to start.

You can track its progress or stop it in the Jobs tab in the Custom models section.

After a model customization job is complete, you can analyze the results of the training process by looking at the files in the output Amazon Simple Storage Service (Amazon S3) folder that you specified when you submitted the job, or you can view details about the model.

Before using a customized model, you need to purchase Provisioned Throughput for Amazon Bedrock and then use the resulting provisioned model for inference. When you purchase Provisioned Throughput, you can select a commitment term, choose a number of model units, and see estimated hourly, daily, and monthly costs. To learn more about the custom model pricing for the Claude 3 Haiku model, visit Amazon Bedrock Pricing.

Now, you can test your custom model in the console playground. I choose my custom model and ask whether Anthropic’s Claude 3.5 Sonnet model is available in Amazon Bedrock.

I receive the answer:

Yes. You can use Anthropic’s most intelligent and advanced model, Claude 3.5 Sonnet in the Amazon Bedrock. You can demonstrate exceptional capabilities across a diverse range of tasks and evaluations while also outperforming Claude 3 Opus.

You can complete this job using AWS APIs, AWS SDKs, or AWS Command Line Interface (AWS CLI). To learn more about using AWS CLI, visit Code samples for model customization in the AWS documentation.

If you are using Jupyter Notebook, visit the GitHub repository and follow a hands-on guide for custom models. To build a production-level operation, I recommend reading Streamline custom model creation and deployment for Amazon Bedrock with Provisioned Throughput using Terraform on the AWS Machine Learning Blog.

Datasets and parameters
When fine-tuning Claude 3 Haiku, the first thing you should do is look at your datasets. There are two datasets that are involved in training Haiku, and that’s the Training dataset and the Validation dataset. There are specific parameters that you must follow in order to make your training successful, which are outlined in the following table.

Training data Validation data
File format JSONL
File size <= 10GB <= 1GB
Line count 32 – 10,000 lines 32 – 1,000 lines
Training + Validation Sum <= 10,000 lines
Token limit < 32,000 tokens per entry
Reserved keywords Avoid having “\nHuman:” or “\nAssistant:” in prompts

When you prepare the datasets, start with a small high-quality dataset and iterate based on tuning results. You can consider using larger models from Anthropic like Claude 3 Opus or Claude 3.5 Sonnet to help refine and improve your training data. You can also use them to generate training data for fine-tuning the Claude 3 Haiku model, which can be very effective if the larger models already perform well on your target task.

For more guidance on selecting the proper hyperparameters and preparing the datasets, read the AWS Machine Learning Blog post, Best practices and lessons for fine-tuning Anthropic’s Claude 3 Haiku in Amazon Bedrock.

Demo video
Check out this deep dive demo video for a step-by-step walkthrough that will help you get started with fine-tuning Anthropic’s Claude 3 Haiku model in Amazon Bedrock.

Now available
Fine-tuning for Anthropic’s Claude 3 Haiku model in Amazon Bedrock is now generally available in the US West (Oregon) AWS Region; check the full Region list for future updates. To learn more, visit Custom models in the Amazon Bedrock documentation.

Give fine-tuning for the Claude 3 Haiku model a try in the Amazon Bedrock console today and send feedback to AWS re:Post for Amazon Bedrock or through your usual AWS Support contacts.

I look forward to seeing what you build when you put this new technology to work for your business.

Channy

Metasploit Weekly Wrap-Up 11/01/2024

Post Syndicated from Alan David Foster original https://blog.rapid7.com/2024/11/01/metasploit-weekly-wrap-up-11-01-2024/

Pool Party Windows Process Injection

Metasploit Weekly Wrap-Up 11/01/2024

This Metasploit-Framework release includes a new injection technique deployed on core Meterpreter functionalities such as process migration and DLL Injection.
The research of a new injection technique known as PoolParty highlighted new ways to gain code execution on a remote process by abusing Thread-Pool management features included on Windows kernel starting from Windows Vista. During our research effort to integrate the new injection technique inside the Meterpreter code-base we encountered some technical challenges we would like to share.. Currently Meterpreter makes use of the (in)famous system feature provided by Microsoft, the kernel32!CreateRemoteThread to achieve code injection. Although nowadays every EDR should be able to prevent an injection using this API call, this still is the most features rich way to inject code in a target process. Our goal during the porting of this technique was to find the variant more suitable for our needs:

  • Able to pass a parameter pointer
  • Able to be injected and later executed, like a Suspended Thread
  • Be able to be injected from and to a WoW64 processes
  • Leave less footprints as possible on the target process

From the Original Pool Party PoC we selected three candidates:

  • TP_WAIT_INSERTION
  • TP_DIRECT_INSERTION
  • WORKER_THREAD_FACTORY_OVERWRITE

In order to achieve the same flexibility offered by the CreateRemoteThread an intermediate stub was developed in order to have correct parameter ordering, controlled execution over a duplicated handle and cleanup of the injection after successful execution making the migration chain looking like:

Target ProcessMeterpreterMetasploit-FrameworkTarget ProcessMeterpreterMetasploit-Framework

Request MigrationInject PoolParty StubInject PoolParty ContextInject Migration StubInject Migration ContextInject Stageless PayloadInject Payload ConfigStart PoolParty Stub (Suspended)Start Migration ProcessSleep 20 secondsResume PoolParty Stub Thread

Pool-Party Stub Details

Argument Passing

The argument passing depends on the variant used, some of them allows argument passing but some doesn’t, during our research we investigated and tested the following two variants for argument passing.

  • TP_WAIT_INSERTION
  • TP_DIRECT_INSERTION

Even if the TP_WAIT_INSERTION supports the argument pointer passing, the format of the WaitCallback expects the parameter to be on the second position instead of the first one, making necessary in an intermediate stub to avoid hot-patching the lpMigrationStub provided by framework.

To have an unified stub that could be used across all variants we decided to not use variant-specific argument passing and decided to retrieve our data from the end of the shellcode.

Delayed Execution

To achieve a suspended-like thread on the PoolParty we came up with the idea of creating and duplicating the HANDLE of an hEvent, in this way, when we perform the step 8. In our migration chain, the execution is delayed by the WaitForSingleObject inside the target process and later released by the Meterpreter using SetEvent against the duplicated handle.

Execution Cleanup

On the original PoC’s shellcode, the execution ends inside an infinite loop that prevents thread from returning successfully. In our investigation we observed different outcomes depending on the variant used to achieve the injection. We were able to successfully clean up the execution on the TP_DIRECT_INSERTION variant.

Injection Features and Limits

Currently the PoolParty injection works with all the 64-bit systems having a Windows Kernel >= 10.0, it supports injection from x64 -> x64 and WoW64 -> x64. Currently there is no support for systems between Windows Vista and Windows 8.1 and the WoW64 injections are partially implemented due to some security restrictions.
Feel free to share with us feedback, issues or requests for further coverage by opening an Issue on GitHub or by sending a message to our Slack Metasploit server.

New module content (3)

WordPress Ultimate Member SQL Injection (CVE-2024-1071)

Authors: Christiaan Swiers and Valentin Lobstein
Type: Auxiliary
Pull request: #19488 contributed by Chocapikk
Path: scanner/http/wp_ultimate_member_sorting_sqli
AttackerKB reference: CVE-2024-1071

Description: This adds a new auxiliary module to exploit an unauthenticated SQL injection vulnerability in the Ultimate Member plugin for WordPress versions 2.1.3 to 2.8.2. The vulnerability allows an unauthenticated attacker to extract sensitive data via the sorting parameter.

WordPress wp-automatic Plugin SQLi Admin Creation

Authors: Rafie Muhammad and Valentin Lobstein
Type: Exploit
Pull request: #19489 contributed by Chocapikk
Path: multi/http/wp_automatic_sqli_to_rce
AttackerKB reference: CVE-2024-27956

Description: This adds a new exploit module for the SQL injection vulnerability in the WordPress wp-automatic plugin, affecting versions prior to 3.92.1. The vulnerability allows unauthenticated attackers to inject SQL commands, enabling them to create a malicious administrator account. Using the newly created admin account, the attacker can upload a plugin and achieve remote code execution.

Advanced Browser Data Extraction for Chromium and Gecko Browsers

Author: Alexander "xaitax" Hagenah
Type: Post
Pull request: #19506 contributed by xaitax
Path: windows/gather/enum_browsers

Description: Adds a new post-exploitation post/windows/gather/enum_browsers module which extracts sensitive browser data from both Chromium-based and Gecko-based browsers on the target system. It supports the decryption of passwords and cookies using Windows Data Protection API (DPAPI) and can extract additional data such as browsing history, keyword search history, download history, autofill data, credit card information, browser cache and installed extensions.

Enhanced Modules (1)

Modules which have either been enhanced, or renamed:

  • #19527 from Chocapikk – Updates the exploit/multi/http/wp_givewp_rce module with a patch bypass. This module is now compatible with GiveWP version 3.16.1.

Enhancements and features (2)

  • #19597 from zeroSteiner – Fix symlink and junction detection on Python windows Meterpreter.
  • #19600 from adfoster-r7 – Updates the post windows modules gather/credentials/seamonkey, gather/credentials/chrome, and gather/enum_chrome as being superseded by windows/gather/enum_browsers.

Bugs fixed (3)

  • #19551 from smashery – This fixes an issue when the LDAP session feature is enabled that caused the USERNAME and PASSWORD datastore options to be required, despite not being necessary when the configuration is set to kerberos or schannel.
  • #19553 from smashery – This fixes a bug in modules that use Kerberos authentication where when the KrbOfferedEncryptionTypes datastore option was set, it would be ignored instead of used to select a compatible ticket from the cache.
  • #19607 from adfoster-r7 – Fixes a bug that caused tables to render incorrectly when running under docker.

Documentation

You can find the latest Metasploit documentation on our docsite at docs.metasploit.com.

Get it

As always, you can update to the latest Metasploit Framework with msfupdate
and you can get more details on the changes since the last blog post from
GitHub:

If you are a git user, you can clone the Metasploit Framework repo (master branch) for the latest.
To install fresh without using git, you can use the open-source-only Nightly Installers or the commercial edition Metasploit Pro

NEVER MISS AN EMERGING THREAT

Be the first to learn about the latest vulnerabilities and cybersecurity news.

[$] OSI board AMA at All Things Open

Post Syndicated from jzb original https://lwn.net/Articles/996356/

Members of the Open Source
Initiative
(OSI) board sat down for a 45-minute “Ask Me Anything”
(AMA) session at All Things
Open
in Raleigh, NC on October 29. Though the floor was open to
any topic the audience might want to ask of the OSI board. Many of the
questions were focused on the Open Source
AI Definition
(OSAID), which was announced the day
before. The new definition has been somewhat controversial,
and the board spent a lot of time addressing concerns about it during
the session, as well as questions on open washing, and a need for more
education about open source in general.

Кошмари преди Хелоуин

Post Syndicated from original https://www.toest.bg/koshmari-predi-helloween/

Кошмари преди Хелоуин

През последните години в българските социални мрежи се оформи своеобразен нов календар, маркиращ смяната на сезоните, като всяка от сакралните му дати е отбелязвана от страховити свади, а празнични събития биват атакувани от защитници на традиционните ценности, възпалени, че някой някъде се забавлява. Всичко това не е характеристика само на българското общество. В САЩ например е известен случаят, в който съдия, гледащ поредното дело, заведено от консервативната организация Focus on the Family („Фокус върху семейството“), възкликва: „Има ли нещо забавно, срещу което да не сте против?!“, а зевзеци ги кръщават Foes of Fun („Врагове на забавлението“). У нас обаче всичко е по-малко и затова изглежда някак битово, като междусъседска свада.

Нов сезон – нов скандал

Началото на вълненията онлайн се дава от Деня на влюбените – Свети Валентин, който привлича яростта на традиционалистите у нас, избиращи, вместо да съчетаят виното и любовта, да отхвърлят второто, очевидно предпочитайки да са пияници. С това сякаш отбелязваме края на зимата и декларираме, че сме готови да мразим – процес, достигащ кулминация в началото на лятото, когато провеждането на „София прайд“ почти всяка година минава с всенародни бунтове, в голямата си част виртуални, но понякога водещи и до съвсем реални побоища, което вече не е смешно. 

Накрая, готови да заспим зимен сън сърдити, похулваме и злополучната Нощ на вси светии, известна като Хелоуин. Именно за последната дата ми е думата, като си признавам, че съм силно пристрастен – фен съм на литературата и киното на ужаса, поради което харесвам празника още от мига, в който гледах носещия името му филм на Джон Карпентър като студент. Тогава още не предполагах, че честването му ще дойде в България. То беше – а и все още е – едно от нещата, които искрено ме радват. През последните години обаче забелязвам засилено брожение срещу събитието, на което се забавляват все пак предимно деца и тийнейджъри. Tази година то бе особено засилено във Facebook, където на всеки опит за отбелязването на Хелоуин от някоя компания имаше реакция от дузини гневни оранжеви личица, по ирония на съдбата поразително напомнящи на тикви. Кръстове и хоругви се размахват в гифчета срещу това, че някой някъде се е осмелил да се маскира и да излезе от сивотата на ежедневието, а в преобличането на деца като герои от „Хари Потър“ будни родолюбци виждат знака на сатаната.

Преди да продължа напред, искам да отбележа, че някои от критиците на празника го мразят от религиозни съображения. Не мога да споря с вярата на никого, но искам да отбележа, че България е светска страна и ако някой член на дадено вероизповедание не иска да отбелязва Нощта на вси светии, абсолютно никой не го задължава да го прави. Малко множко идва обаче, когато въпросният човек иска да забрани на другите да го честват – все едно човек на диета да забрани на всички около себе си да ядат сладкиши, за да не го дразнят. 

„Не на небългарския празник!“

Приказката ми е по-скоро за това, че Хелоуин е небългарски празник, няма корени у нас и затова не бива да се отбелязва. Доста хора вече остроумно дадоха отговор, че бобът и картофите също идват от омразната на нашего брата патриот Америка, но това все пак не ни е спряло да ги направим част от традиционната българска кухня. 

Традициите се създават. Добър пример е леденото хоро, което, противно на спекулациите, е създадено сравнително скоро, но се радва на широк интерес и в това няма нищо лошо, разбира се.

Проблемът с Хелоуин, изглежда, е друг – че това е празник, който ни свързва със света и западната култура, а не ни затваря в рамките на нашата. За някои кръгове в страната е по-изгодно ние да отхвърляме всичко, което идва от Америка (дори както в случая всъщност да произхожда от Ирландия), така щото да намразим всичко непознато и ако може да се върнем в обятията на руската мечка – цел явно на немалко политици и общественици у нас, тъгуващи по миналото на равнис с СССР. 

Последният аргумент е, че историите за призраци и дяволи са органично чужди на нашата култура и по някакъв начин я омърсяват. Тук обаче има един проблем, тъй като България не е страна с отрицателно отношение към ужасите в исторически план.

Последното, естествено, не е голяма изненада. Историите, които хората си разказват, са стари колкото света, а страшните винаги са били най-интересни. Родните предания изобилстват от различни плашещи легенди, някои от които разказвани и до ден днешен. Лично аз имам позната, която ми е разправяла, че неин приятел починал, след като бил погледнат от странна жена – според тях самодива. Друга подобна история е за катастрофа на камион край селото на приятел, като след случилото се шофьорът бил готов да се закълне, че направил фаталната маневра, за да избегне появило се от нищото на пътя момиче, което после също тъй загадъчно изчезнало. Подобни неща се разказват по цял свят, но България е страна, която е свързана с ужасите от доста отдавна.

Родни ужаси

В историческата книга „Кой кой е в средновековна България“ срещаме името на Ладика, отмъстителен дух на красива млада жена, забременяла от чешки рицар, който я подлъгал, че ще се ожени за нея, но така и не се върнал, а тя намерила начин да витае в замъка му. Косите ми се изправиха, когато четох легендата като ученик, а от днешна гледна точка се замислям дали филм за Ладика не би могъл да бъде българският отговор на духовете от американската сага „Заклинанието“.

През 1882 г. бащата на българската литература Иван Вазов пише баладата „Кулата“. Макар и в стихотворна форма, тя спокойно може да се определи като произведение на ужаса. Ето какви стихове четем, описващи срещата на главния герой с оживелия труп на възрастна, наскоро починала жена:

Внезапно кръвта му замръзна във жили!
Той гледа: пред него се бабата хили,
главата ѝ се люшка, ръцете ѝ висят,
от цялото ѝ тяло вей ужас и смрът. 

Из гроба дошла е. Уста ѝ се чернеят
наместо две очи, две дупки там зеят,
тя хили се, стъпа и иде насам,
а Янко е цял лед и дъха едвам.

Преди Втората световна война в България творят диаболистите, група автори с най-ярки представители Светослав Минков и Владимир Полянов. В миналото имаше спорове доколко двамата могат да бъдат свързвани със съвременния хорър, предвид това, че по времето на комунистическата диктатура нишката изглежда прекъсната. Научна конференция, организирана по инициатива на писателя Александър Карапанчев, обаче потвърди, че те са ранни примери на българска литература на ужаса.

След падането на комунизма няма да е пресилено да се каже, че ужасите завладяват България. Мнозина от нас помнят как улиците опустяваха при излъчването на епизодите на „Туин Пийкс“ на Дейвид Линч, а по радиата вървяха реклами на филмовото му продължение „Огън, следвай ме“. Макар и по-ниска топка в художествено отношение, интерес предизвикаха и „Досиетата Х“. 

Що се отнася до книжния пазар, имаше момент, в който едва ли е съществувал дом на млади хора по градовете, където да не можеше да се намери поне една книга от Стивън Кинг. В България неговите творби излязоха и с изключително ефектни корици от художника Петър Станимиров, като сред любителите на жанра се носи градската легенда как самият автор се уплашил, когато ги видял. Кинг вдъхнови и свои български последователи, които през второто десетилетие на новия век основаха писателския клуб „Лазарус“ и издадоха сравнително успешни сборници, като „Писъци“, „Вой“ и „Сърдити небеса“. Тук е мястото да уточня, че в първите два имам участие и не говоря наизуст.

Всичко казано дотук сочи, че хорърът съвсем не е толкова чужд на българите. Това се потвърди съвсем скоро по екстремен начин, когато третата част на кървавата поредица „Терифайър“ от Деймиън Лиони се изкачи до първото място във филмовия боксофис на страната с приходи от над 100 000 лв. в премиерния си уикенд. Говорим за филм, който е насочен към ценители на жанра, а не към широката публика – оказва се, че в привидно свръхконсервативна България има интерес към такова произведение.

Българският фолклор и неговият хорър потенциал

Внимание от културологична гледна точка заслужава аргументът, че ние лесно се хвърляме да почитаме чуждия празник, а така пренебрегваме своите кукери, които изпълняват сходна роля – носят страшни маски, за да пъдят зли духове. Това не е съвсем честно, тъй като фестивали като „Сурва“ се радват на широк интерес, но е факт, че кукерите у нас не пленяват масово съзнанието по начина, по който го прави Хелоуин, и си заслужава да се коментира защо е така. Ще си позволя да изградя една работна хипотеза, без да имам претенциите, че тя е изчерпателна или научно проверена. 

Първо, аз смятам, че нашата българска традиция в хоръра заслужава внимание. Кукерите са част от нея и не само че са особено интересни, но според мен освен на датите около традиционното празнуване могат да бъдат интегрирани и в самия Хелоуин, особено предвид факта, че започнаха да се появяват съвременни произведения във фантастичния жанр, черпещи вдъхновение от народните предания за тях. Подобно внимание заслужават и други образи от митологията ни, като змея, халата и ламята. 

Има обаче един проблем в начина, по който осъзнаваме нашия фолклор. Той е нещо, което се съхранява, не следва да се променя и съществува, за да ни отличи от другите, да им се противопостави. В съвременния свят е важно един народ да има котва, която да му казва кой е и откъде е. Затварянето в крепост обаче нито е възможно, нито е желано в глобализиращия се свят, а що се отнася до преданията ни, без обновление те ще изсъхнат и ще се превърнат в музеен експонат. 

Ще дам един пример с Япония. Това е страна, която здраво пази традициите си и в същото време изглежда не просто модерна, а футуристична. Този поглед е малко опростен и изключва някои от детайлите, но общата картина е поне донякъде достоверна. Японците нямат проблем да се забавляват с Хелоуин. В същото време популярни и обичани остават и техните собствени празници, свързани с духовете, които са през лятото – когато според японците границите между световете на живи и покойници изтъняват. Една от причините за това според мен е, че японският фолклор днес е по-жив от всякога. Говорим за създаване на митове и легенди днес, разпространяващи се като мемета сред младите хора онлайн. Една от най-смразяващите истории е за момиче, което заспива във влак и се буди на неизвестна гара, където му се случват причудливи и зловещи събития.

Подобни легенди запазват митологията на страната жива и стават част от съвременната ѝ култура, например от киното, като така не само че не губят позиции спрямо инвазията на образи от популярната американска култура, ами настъпват към нея и стават разпознаваеми по цял свят, какъвто е случаят с жената от видеокасетата във филмите „Предизвестена смърт“, всъщност версия на традиционен дух от японската митология, но пречупен през съвременността. 

Казаното дотук не е призив да се завърнем към суеверията и масово да вярваме, че самодиви могат да ни кълнат до смърт само с поглед, а пример, че оцеляването на дадена култура минава не през противопоставяне, а през диалог с чуждата, така щото да може да излезе от своите граници и наистина да се превърне във визитна картичка за страната си пред света.

Лично аз смятам, че примерът с Япония е особено вдъхновяващ. Тя бива поставена на колене с две атомни бомби, но успява да се възстанови икономически и вместо да тръгне по пътя на противопоставянето, успешно се влива в съвременната култура и в някаква степен дори покорява победилата я Америка с качествената си анимация, със занимателните си видеоигри и с изключителното кино, предлагащо образци на произведения за забавление, като филмите за Годзила, но и на изкуство на недостижимо ниво, каквото са произведенията на Куросава. 

За България ще е свръхпредизвикателство да постигне нещо такова, но наградата „Букър“ на Господинов показва, че когато спрем да се зъбим на света и започнем да говорим с него, биваме както забелязвани, така и оценявани. 

Fine-grained access control in Amazon EMR Serverless with AWS Lake Formation

Post Syndicated from Anubhav Awasthi original https://aws.amazon.com/blogs/big-data/fine-grained-access-control-in-amazon-emr-serverless-with-aws-lake-formation/

In today’s data-driven world , enterprises are increasingly reliant on vast amounts of data to drive decision-making and innovation. With this reliance comes the critical need for robust data security and access control mechanisms. Fine-grained access control restricts access to specific data subsets, protecting sensitive information and maintaining regulatory compliance. It allows organizations to set detailed permissions at various levels, including database, table, column, and row. This precise control mitigates risks of unauthorized access, data leaks, and misuse. In the unfortunate event of a security incident, fine-grained access control helps limit the scope of the breach, minimizing potential damage.
AWS is introducing general availability of fine-grained access control based on AWS Lake Formation for Amazon EMR Serverless on Amazon EMR 7.2. Enterprises can now significantly enhance their data governance and security frameworks. This new integration supports the implementation of modern data lake architectures, such as data mesh, by providing a seamless way to manage and analyze data. You can use EMR Serverless to enforce data access controls using Lake Formation when reading data from Amazon Simple Storage Service (Amazon S3), enabling robust data processing workflows and real-time analytics without the overhead of cluster management.

In this post, we discuss how to implement fine-grained access control in EMR Serverless using Lake Formation. With this integration, organizations can achieve better scalability, flexibility, and cost-efficiency in their data operations, ultimately driving more value from their data assets.

Key use cases for fine-grained access control in analytics

The following are key use cases for fine-grained access control in analytics:

  • Customer 360 – You can enable different departments to securely access specific customer data relevant to their functions. For example, the sales team can be granted access only to data such as customer purchase history, preferences, and transaction patterns. Meanwhile, the marketing team is limited to viewing campaign interactions, customer demographics, and engagement metrics.
  • Financial reporting – You can enable financial analysts to access the necessary data for reporting and analysis while restricting sensitive financial details to authorized executives.
  • Healthcare analytics – You can enable healthcare researchers and data scientists to analyze de-identified patient data for medical advancements and research, while making sure Protected Health Information (PHI) remains confidential and accessible only to authorized healthcare professionals and personnel.
  • Supply chain optimization – You can grant logistics teams visibility into inventory and shipment data while limiting access to pricing or supplier information to relevant stakeholders.

Solution overview

In this post, we explore how to implement fine-grained access control on Iceberg tables within an EMR Serverless application, using the capabilities of Lake Formation. If you’re interested in learning how to implement fine-grained access control on open table formats in Amazon EMR running on Amazon Elastic Compute Cloud (Amazon EC2) instances using Lake Formation, refer to Enforce fine-grained access control on Open Table Formats via Amazon EMR integrated with AWS Lake Formation.
With the data access control features available in Lake Formation, you can enforce granular permissions and govern access to specific columns, rows, or cells within your Iceberg tables. This approach makes sure sensitive data remains secure and accessible only to authorized users or applications, aligning with your organization’s data governance policies and regulatory compliance requirements.

A cross-account modern data platform on AWS involves setting up a centralized data lake in a primary AWS account, while allowing controlled access to this data from secondary AWS accounts. This setup helps organizations maintain a single source of truth for their data, provides consistent data governance, and uses the robust security features of AWS across multiple business units or project teams.

To demonstrate how you can use Lake Formation to implement cross account fine-grained access control within an EMR Serverless environment, we use the TPC-DS dataset to create tables in the AWS Glue Data Catalog in the AWS producer account and provision different user personas to reflect various roles and access levels in the AWS consumer account, forming a secure and governed data lake.

The following diagram illustrates the solution architecture.

The producer account contains the following persona:

  • Data engineer – Tasks include data preparation, bulk updates, and incremental updates. The data engineer has the following access:
    • Table-level access – Full read/write access to all TPC-DS tables.

The consumer account contains the following personas:

  • Finance analyst – We run a sample query that performs a sales data analysis to guide marketing, inventory, and promotion strategies based on demographic and geographic performance. The finance analyst has the following access:
    • Table-level access – Full access to tables store_sales, catalog_sales, web_sales, item, and promotion for comprehensive financial analysis.
    • Column-level access – Limited access to cost-related columns in the sales tables to avoid exposure to sensitive pricing strategies. Limited access to sensitive columns like credit_rating in the customer_demographics table.
    • Row-level access – Access only to sales data from the current fiscal year or specific promotional periods.
  • Product analyst – We run a sample query that does a customer behavior analysis to tailor marketing, promotions, and loyalty programs based on purchase patterns and regional insights. The product analyst has the following access:
    • Table-level access – Full access to tables item, store_sales, and customer tables to evaluate product and market trends.
    • Column-level access – Restricted access to personal identifiers in the customer table, such as customer_address , email_address, and date of birth.

Prerequisites

You should have the following prerequisites:

Set up infrastructure in the producer account

We provide a CloudFormation template to deploy the data lake stack with the following resources:

  • Two S3 buckets: one for scripts and query results, and one for the data lake storage
  • An Amazon Athena workgroup
  • An EMR Serverless application
  • An AWS Glue database and tables on external public S3 buckets of TPC-DS data
  • An AWS Glue database for the data lake
  • An IAM role and polices

Set up Lake Formation for the data engineer in the producer account

Set up Lake Formation cross-account data sharing version settings:

  1. Open the Lake Formation console with the Lake Formation data lake administrator in the producer account.
  2. Under Data Catalog settings, pick Version 4 under Cross-account version settings.

To learn more about the differences between data sharing versions, refer to Updating cross-account data sharing version settings. Make sure Default permissions for newly created databases and tables is unchecked.

Register the Amazon S3 location as the data lake location

When you register an Amazon S3 location with Lake Formation, you specify an IAM role with read/write permissions on that location. After registering, when EMR Serverless requests access to this Amazon S3 location, Lake Formation will supply temporary credentials of the provided role to access the data. We already created the role LakeFormationServiceRole using the CloudFormation template. To register the Amazon S3 location as the data lake location, complete the following steps:

  1. Open the Lake Formation console with the Lake Formation data lake administrator in the producer account.
  2. In the navigation pane, choose Data lake locations under Administration.
  3. Choose Register location.
  4. For Amazon S3 path, enter s3://<DatalakeBucketName>. (Copy the bucket name from the CloudFormation stack’s Outputs tab.)
  5. For IAM role, enter LakeFormationServiceRoleDatalake.
  6. For Permission mode, select Lake Formation.
  7. Choose Register location.

Generate TPC-DS tables in the producer account

In this section, we generate TPC-DS tables in Iceberg format in the producer account.
Grant database permissions to the data engineer
First, let’s grant database permissions to the data engineer IAM role Amazon-EMR-ExecutionRole_DE that we will use with EMR Serverless. Complete the following steps:

  1. Open the Lake Formation console with the Lake Formation data lake administrator in the producer account.
  2. Choose Databases and Create database.
  3. Enter iceberg_db for Name and s3://<DatalakeBucketName> for Location.
  4. Choose Create database.
  5. In the navigation pane, choose Data lake permissions and choose Grant.
  6. In the Principles section, select IAM users and roles and choose Amazon-EMR-ExecutionRole_DE.
  7. In the LF-Tags or catalog resources section, select Named Data Catalog resources and choose tpc-source and iceberg_db for Databases.
  8. Select Super for both Database permissions and Grantable permissions and choose Grant.

Create an EMR Serverless application

Now, let’s log in to EMR Serverless using Amazon EMR Studio and complete the following steps:

  1. On the Amazon EMR console, choose EMR Serverless.
  2. Under Manage applications, choose my-emr-studio. You will be directed to the Create application page on EMR Studio. Let’s create a Lake Formation enabled EMR Serverless application
  3.  Under Application settings, provide the following information:
    1. For Name, enter a name emr-fgac-application.
    2. For Type, choose Spark.
    3. For Release version, choose emr-7.2.0.
    4. For Architecture, choose x86_64.
  4. Under Application setup options, select Use custom settings.
  5. Under Interactive endpoint, select Enable endpoint for EMR studio
  6. Under Additional configurations, for Metastore configuration, select Use AWS Glue Data Catalog as metastore, then select Use Lake Formation for fine-grained access control.
  7. Under Network connections, choose emrs-vpc for the VPC, enter any two private subnets, and enter emr-serverless-sg for Security groups.
  8. Choose Create and start application.

Create a Workspace

Complete the following steps to create an EMR Workspace:

  1. On the Amazon EMR console, choose Workspaces in the navigation pane and choose Create Workspace.
  2. Enter the Workspace name emr-fgac-workspace.
  3. Leave all other settings as default and choose Create Workspace.
  4. Choose Launch Workspace. Your browser might request to allow pop-up permissions for the first time launching the Workspace.
  5. After the Workspace is launched, in the navigation pane, choose Compute.
  6. For Compute type¸ select EMR Serverless application and enter emr-fgac-application for the application and Amazon-EMR-ExecutionRole_DE as the runtime role.
  7. Make sure the kernel attached to the Workspace is PySpark.
  8. Navigate to the File browser section and choose Upload files.
  9. Upload the file Iceberg-ingest-final_v2.ipynb.
  10. Update the data lake bucket name, AWS account ID, and AWS Region accordingly.
  11. Choose the double arrow icon to restart the kernel and rerun the notebook.


To verify that the data is generated, you can go to the AWS Glue console. Under Data Catalog, Databases, you should see TPC-DS tables ending with _iceberg for the database iceberg_db.

Share the database and TPC-DS tables to the consumer account

We now grant permissions to the consumer account, including grantable permissions. This allows the Lake Formation data lake administrator in the consumer account to control access to the data within the account.

Grant database permissions to the consumer account

Complete the following steps:

  1. Open the Lake Formation console with the Lake Formation data lake administrator in the producer account.
  2. In the navigation pane, choose Databases.
  3. Select the database iceberg_db, and on the Actions menu, under Permissions, choose Grant.
  4. In the Principles section, select External accounts and enter the consumer account.
  5. In the LF-Tags or catalog resources section, select Named Data Catalog resources and choose iceberg_db for Databases.
  6. In the Database permissions section, select Describe for both Database permissions and Grantable permissions.

This allows the data lake administrator in the consumer account to describe the database and grant describe permissions to other principals in the consumer account.

Grant table permissions to the consumer account

Repeat the preceding steps to grant table permissions to the consumer account.

Choose All tables under Tables and provide select and describe permissions for Table permissions and Grantable permissions.

Set up Lake Formation in the consumer account

For the remaining section of the post, we focus on the consumer account. Deploy the following CloudFormation stack to set up resources:

The template will create the Amazon EMR runtime role for both analyst user personas.
Log in to the AWS consumer account and accept the AWS RAM invitation first:

  1. Open the AWS RAM console with the IAM identity that has AWS RAM access.
  2. In the navigation pane, choose Resource shares under Shared with me.
  3. You should see two pending resource shares from the producer account.
  4. Accept both invitations.

You should be able to see the iceberg_db database on the Lake Formation console.

Create a resource link for the shared database

To access the database and table resources that were shared by the producer AWS account, you need to create a resource link in the consumer AWS account. A resource link is a Data Catalog object that is a link to a local or shared database or table. After you create a resource link to a database or table, you can use the resource link name wherever you would use the database or table name. In this step, you grant permission on the resource links to the job runtime roles for EMR Serverless. The runtime roles will then access the data in shared databases and underlying tables through the resource link.
To create a resource link, complete the following steps:

  1. Open the Lake Formation console with the Lake Formation data lake administrator in the consumer account.
  2. In the navigation pane, choose Databases.
  3. Select the iceberg_db database, verify that the owner account ID is the producer account, and on the Actions menu, choose Create resource links.
  4. For Resource link name, enter the name of the resource link (iceberg_db_shared).
  5. For Shared database’s region, choose the Region of the iceberg_db database.
  6. For Shared database, choose the iceberg_db database.
  7. For Shared database’s owner ID, enter the account ID of the producer account.
  8. Choose Create.

Grant permissions on the resource link to the EMR job runtime roles

Grant permissions on the resource link to Amazon-EMR-ExecutionRole_Finance and Amazon-EMR-ExecutionRole_Product using the following steps:

  1. Open the Lake Formation console with the Lake Formation data lake administrator in the consumer account.
  2. In the navigation pane, choose Databases.
  3. Select the resource link (iceberg_db_shared) and on the Actions menu, choose Grant.
  4. In the Principles section, select IAM users and roles, and choose Amazon-EMR-ExecutionRole_Finance and Amazon-EMR-ExecutionRole_Product.
  5. In the LF-Tags or catalog resources section, select Named Data Catalog resources and for Databases, choose iceberg_db_shared.
  6. In the Resource link permissions section, select Describe for Resource link permissions.

This allows the EMR Serverless job runtime roles to describe the resource link. We don’t make any selections for grantable permissions because runtime roles shouldn’t be able to grant permissions to other principles.
Choose Grant.

Grant table permissions for the finance analyst

Complete the following steps:

  1. Open the Lake Formation console with the Lake Formation data lake administrator in the consumer account.
  2. In the navigation pane, choose Databases.
  3. Select the resource link (iceberg_db_shared) and on the Actions menu, choose Grant on target.
  4. In the Principles section, select IAM users and roles, then choose Amazon-EMR-ExecutionRole_Finance.
  5. In the LF-Tags or catalog resources section, select Named Data Catalog resources and specify the following:
    1. For Databases, choose iceberg_db.
    2. For Tables¸ choose store_sales_iceberg.
  6. In the Table permissions section, for Table permissions, select Select.
  7. In the Data permissions section, select Column-based access.
  8. Select Exclude columns and choose all cost-related columns (ss_wholesale_cost and ss_ext_wholesale_cost).
  9. Choose Grant.
  10. Similarly, grant access to table customer_demographics_iceberg and exclude the column cd_credit_rating.
  11. Following the same steps, grant All data access for tables store_iceberg and item_iceberg.
  12. For the table date_dim_iceberg, we provide selective row-level access.
  13. Similar to the preceding table permissions, select date_dim_iceberg under Tables and in the Data filters section, choose Create new.
  14. For Data filter name, enter FA_Filter_year.
  15. Select Access to all columns under Column-level access.
  16. Select Filter rows and for Row filter expression, enter d_year=2002 to only provide access to the 2002 year.
  17. Choose Save changes.
  18. Choose Create filter.
  19. Make sure FA_Filter_year is selected under Data filters and grant select permissions on the filter.

Grant table permissions for the product analyst

You can provide permissions for the next set of tables required for the product analyst role using the Lake Formation console. Alternatively, you can use the AWS Command Line Interface (AWS CLI) to grant permissions. We provide grant on target permissions for the resource link iceberg_db_shared to IAM role Amazon-EMR-ExecutionRole_Product.

  1. Similar to steps followed in previous sections, for table store_sales_iceberg, date_dim_iceberg, store_iceberg, and house_hold_demographics_iceberg, provide select permissions for All data access. Make sure the role selected is Amazon-EMR-ExecutionRole_Product.

For table customer_iceberg, we limit access to personally identifiable information (PII) columns.

  1. Under Data permissions, select Column-based access and Exclude columns.
  2. Choose columns c_birth_day, c_birth_month, c_birth_year, c_current_addr_sk, c_customer_id, c_email_address, and c_birth_country.

Verify access using interactive notebooks from EMR Studio

Complete the following steps to test role access:

  1. Log in to the AWS consumer account and open the Amazon EMR console.
  2. Choose EMR Serverless in the navigation pane and choose an existing EMR Studio.
  3. If you don’t have EMR Studio configured, choose Get Started and select Create and launch EMR Studio.
  4. Create a Lake Formation enabled EMR Serverless application as described in previous sections.
  5. Create an EMR Studio Workspace as described in previous sections.
  6. Use emr-studio-service-role for Service role and datalake-resources-<account_id>-<region> for Workspace storage, then launch your Workspace.

Now, let’s verify access for the finance analyst.

  1. Make sure the compute type inside your Workspace is pointing to the EMR Serverless application created in the prior step and Amazon-EMR-ExecutionRole_Finance as the interactive runtime role.
  2. Go to File browser in the navigation pane, choose Upload files, and add Notebook_FA.ipynb to your Workspace.
  3. Run all the cells to verify fine-grained access.

Now let’s test access for the product analyst.

  1. In the same Workspace, detach and attach the same EMR Serverless application with Amazon-EMR-ExecutionRole_Product as the interactive runtime role.
  2. Upload Notebook_PA.ipynb under the File browser section.
  3. Run all the cells to verify fine-grained access for the product analyst.

In a real-world scenario, both analysts will likely have their own Workspace with restricted rights to assume only the authorized interactive runtime role.

Considerations and limitations

EMR Serverless with Lake Formation uses Spark resource profiles to create two profiles and two Spark drivers for access control. Read this white paper to learn about the feature details. The user profile runs the supplied code, and the system profile enforces Lake Formation policies. Therefore, it’s recommended that you have a minimum of two Spark drivers when pre-initialized capacity is used with Lake Formation enabled jobs. No change in executor count is required. Refer to Using EMR Serverless with AWS Lake Formation for fine-grained access control to learn more about the technical implementation of the Lake Formation integration with EMR Serverless.

You can expect a performance overhead after enabling Lake Formation. The level of access (table, column, or row) and the amount of data filtered will have significant impact on query performance.

Clean up

To avoid incurring ongoing costs, complete the following steps to clean up your resources:

  1. In your secondary (consumer)  account, log in to the Lake Formation console.
  2. Drop the resource share table.
  3. In your primary (producer) account, log in to the Lake Formation console.
  4. Revoke the access you configured.
  5. Drop the AWS Glue tables and database.
  6. Delete the AWS Glue job.
  7. Delete the S3 buckets and any other resources that you created as part of the prerequisites for this post.

Conclusion

In this post, we showed how to integrate Lake Formation with EMR Serverless to manage access to Iceberg tables. This solution showcases a modern way to enforce fine-grained access control in a multi-account open data lake setup. The approach simplifies data management in the main account while carefully controlling how users access data in other secondary accounts.

Try out the solution for your own use case, and let us know your feedback and questions in the comments section.


About the Authors

Anubhav Awasthi is a Sr. Big Data Specialist Solutions Architect at AWS. He works with customers to provide architectural guidance for running analytics solutions on Amazon EMR, Amazon Athena, AWS Glue, and AWS Lake Formation.

Nishchai JM is an Analytics Specialist Solutions Architect at Amazon Web services. He specializes in building Big-data applications and help customer to modernize their applications on Cloud. He thinks Data is new oil and spends most of his time in deriving insights out of the Data.