Logo: Migrate Glue Devendpoint To Interactive Sessions

Migrate Glue Devendpoint To Interactive Sessions

OrganisatiounBeléift
aws-samples
migrate-glue-devendpoint-to-interactive-sessions

Migrate a legacy AWS Glue development endpoint to a Glue interactive session, following the official AWS migration checklist. Inventories the dev endpoint config, maps it to an equivalent interactive session (runtime role, Glue version, workers, VPC connection, idle timeout), provisions the session, validates by running the developer's Spark/PySpark code, and deletes the dev endpoint after the user confirms. Use when: migrate glue dev endpoint, move off dev endpoints, dev endpoint to interactive sessions, replace glue dev endpoint, glue dev endpoint deprecated, modernize glue dev environment. Do NOT use for: upgrading a Glue ETL job version 0.9/1.0 to 4.0 (use glue-09-10-migration), creating a brand-new interactive session with no source dev endpoint, or migrating dev endpoints to Amazon EMR.

Iwwersiicht

Editeuraws-samples
Repositoryaws-glue-samples
Skill-Nummmigrate-glue-devendpoint-to-interactive-sessions
Stären
1.5K
Forks
834
Matgeliwwert Dateien
1
LizenzMIT-0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    aws-samples huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Migrate Glue Devendpoint To Interactive Sessions an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/aws-samples/aws-glue-samples/tree/master/utilities/skills/migrate-glue-devendpoint-to-interactive-sessions
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aws-samples/aws-glue-samples.git /tmp/aws-glue-samples
mkdir -p .claude/skills
cp -r /tmp/aws-glue-samples/utilities/skills/migrate-glue-devendpoint-to-interactive-sessions .claude/skills/migrate-glue-devendpoint-to-interactive-sessions
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Migrate Glue Devendpoint To Interactive Sessions an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Migrate Glue Devendpoint To Interactive Sessions automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Migrate Glue Devendpoint To Interactive Sessions net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Migrate Glue Dev Endpoint to Interactive Session

Move a developer off a legacy Glue development endpoint (Glue 0.9/1.0, no console since March 2023, billed continuously) onto a Glue interactive session (Glue 2.0+, sub-minute startup, idle timeout, console support). Follows the official checklist: https://docs.aws.amazon.com/glue/latest/dg/development-migration-checklist.html

The migration is additive and reversible until the final step: the session is created and validated alongside the still-running dev endpoint. The dev endpoint is deleted only after the user confirms the session works.

Reference Documentation

  • references/migration-mapping.md -- DevEndpoint field → session magic/API mapping, the access-method decision table, IAM two-principal setup, and code-compatibility notes for the 0.9/1.0 → 3.0+ jump.

Workflow

1. Inventory the Dev Endpoint and Route

1.1. Confirm inputs: dev endpoint name, region, AWS CLI profile. MUST NOT proceed without a dev endpoint name.

1.2. Call glue:GetDevEndpoint(EndpointName=<name>). Store as source. Record: RoleArn, GlueVersion, WorkerType, NumberOfWorkers (or NumberOfNodes), SubnetId, SecurityGroupIds, Arguments, ExtraPythonLibsS3Path, ExtraJarsS3Path, PublicAddress/PrivateAddress, Status.

1.3. Route on access method — ask the user how they use the dev endpoint today (or infer from source). This determines the session interface, per the official checklist. See the decision table in references/migration-mapping.md:

  • SageMaker / Jupyter / JupyterLab notebook → Glue Studio notebook (upload .ipynb)
  • Zeppelin notebook → convert to Jupyter, then Glue Studio notebook
  • IDE (PyCharm / VS Code) → IDE integration for interactive sessions
  • REPL → local aws-glue-sessions package
  • SSH → no direct equivalent; use the Glue Docker image for local dev

1.4. Route on code compatibility (this is the hard gate): interactive sessions run Glue 2.0+ only — they cannot run 0.9/1.0. If the dev endpoint's scripts depend on 0.9/1.0-specific behavior (HDFS, YARN configs, Spark 2.x semantics, Python 2 syntax), the code MUST be upgraded to Glue 3.0+ first.

  • If the user has 0.9/1.0-specific code → migrate the code using the glue-09-10-migration skill (its breaking-change catalogue covers Spark 2.x→3.x, Python 2→3, Scala, Log4j, Parquet timestamps) BEFORE provisioning the session.
  • If the code is already version-agnostic PySpark/GlueContext → proceed directly.

2. Set Up IAM (two-principal model)

Interactive sessions need two principals (the #1 setup failure). See references/migration-mapping.md for exact policies.

  • Runtime role: pass to CreateSession. Reuse the dev endpoint's RoleArn — it already has the right Glue job permissions and trusts glue.amazonaws.com.
  • Client principal: the user/role running the notebook or CLI. MUST have permission to call session APIs (e.g. AWSGlueConsoleFullAccess) AND iam:PassRole on the runtime role. Verify before creating the session.

3. Provision the Interactive Session

Build session config by mapping source fields (full table in the reference):

Dev endpointSession setting
RoleArn--role (runtime role)
GlueVersion 0.9/1.0--glue-version 3.0 (or 4.0/5.0); never 0.9/1.0
WorkerType / NumberOfWorkers--worker-type / --number-of-workers (default 5)
SubnetId + SecurityGroupIdsa Glue connection referenced via %connections / --connections
ExtraPythonLibsS3Path%additional_python_modules
ExtraJarsS3Path%extra_jars
--enable-glue-datacatalog argsession default arg / %%configure
(dev endpoints never time out)--idle-timeout <min> — always set this

3.1. Default: --glue-version 4.0, same WorkerType/NumberOfWorkers as the dev endpoint, --idle-timeout 30, Python 3. Override on request ("use Glue 3.0", "use 10 workers", "idle timeout 60").

3.2. Create via the user's chosen interface:

  • Notebook (Glue Studio / Jupyter): set magics in the first cell — %iam_role, %glue_version, %worker_type, %number_of_workers, %idle_timeout, %connections — then run a cell to start the session.
  • Headless / CLI (use for automated validation): glue:CreateSession with --id, --role, --command Name=glueetl,PythonVersion=3, --glue-version, --worker-type, --number-of-workers, --idle-timeout. Poll glue:GetSession until Status=READY (typically under 1 minute).

4. Validate Equivalence

4.1. Run the developer's actual Spark/PySpark code in the new session and compare output to the dev endpoint.

  • Notebook path: run the migrated .ipynb cells; confirm no errors and matching results.
  • Headless path: submit the code with glue:RunStatement(SessionId, Code), poll glue:GetStatement until Statement.State=AVAILABLE, then read the result from Statement.Output.Data.TextPlain (the exact JSON paths — do not guess). A Statement.Output.Status=error means the code failed — capture Statement.Output.ErrorName/ErrorValue.

4.2. PASS criterion: the session produces functionally equivalent output. Spark version (2.4.x → 3.3.x+) and Python version (3.6 → 3.10) WILL differ; that is expected and not a failure. On PASS → Step 5.

4.3. On failure, classify the error before doing anything else:

  • CODE_COMPATIBILITY — a Glue 0.9/1.0 breaking change surfacing on Spark 3.x / Python 3.10. Signals: SyntaxError, ImportError/ModuleNotFoundError, No FileSystem for scheme: hdfs, untyped Scala UDF, Log4j 1.x classes, Parquet timestamp/rebase errors, Scala 2.11 binary incompatibility, AWS SDK 1.11 method not found. Fix path: use the glue-09-10-migration skill's breaking-change catalogue to diagnose and patch the code. Validate the patched code by re-running it in THIS interactive session via glue:RunStatement — do NOT create or run a Glue job for validation (that is glue-09-10-migration's native mechanism; here the session is the validation surface). Then re-run 4.1.

  • MIGRATION_CONFIG_GAP — the code is fine but the session is missing something the dev endpoint provided. Signals: cannot reach a VPC data store (no Glue connection), ModuleNotFoundError for a lib that was in ExtraPythonLibsS3Path, ClassNotFoundException for a jar that was in ExtraJarsS3Path, catalog tables not found (--enable-glue-datacatalog not carried over). Fix path: patch the session config (add %connections/--connections, %additional_python_modules, %extra_jars, or the catalog arg) per the mapping in Step 3, recreate the session, and re-run 4.1.

  • TRANSIENT — provisioning/throttling/internal errors with no user-code traceback. Fix path: retry 4.1 once.

4.4. Attempt budget (mirrors glue-09-10-migration): MAX_FIX_ATTEMPTS = 5. Each fix-and-rerun consumes one attempt. After each failure, compute a fingerprint (error_name + ":" + failing_symbol); if a fingerprint repeats (the same failure recurred after its fix), go to the Exit path immediately — do not burn the rest of the budget on a fix that is not converging. If the error matches no class in 4.3, go to the Exit path. On reaching 5 attempts without a PASS, go to the Exit path.

4.5. Exit path (validation cannot be made to pass): MUST NOT proceed to Step 5 and MUST NOT delete the dev endpoint — it is the rollback. Keep the dev endpoint running. Stop the session (glue:StopSession) to avoid cost, but leave it for debugging. Report classification, the error, what was tried, and manual next steps:

MIGRATION RESULT: VALIDATION FAILED — dev endpoint RETAINED
Dev endpoint: <name>  (Glue <ver>)  -> KEPT (rollback intact)
Interactive session: <id>  -> STOPPED (kept for debugging)
Halt reason: <BUDGET_EXHAUSTED|CYCLE_DETECTED|UNCLASSIFIED>
Failure class: <CODE_COMPATIBILITY|MIGRATION_CONFIG_GAP|TRANSIENT|UNCLASSIFIED>
Error: <ErrorName>: <ErrorValue>
Fixes attempted: [list]
Manual next steps: [list]

5. Decommission the Dev Endpoint (confirm first)

5.1. Present the validation result, then explicitly ask the user to confirm deletion of the dev endpoint — it is the rollback path. Ask a direct yes/no question naming the endpoint, for example: "Validation passed. Delete dev endpoint '<name>' in <region> now? Its definition will be backed up to S3 first. (yes/no)" MUST wait for an affirmative reply. Treat anything other than a clear yes (no answer, "later", "keep it", silence) as NO: skip deletion, leave the dev endpoint running, and tell the user it was kept and how to delete it themselves later. MUST NOT delete on assumption or to "save cost" without this explicit yes.

5.2. Back up the dev endpoint definition before deleting (MUST NOT skip). A deleted dev endpoint cannot be recovered, so persist its full config first. Write the source definition captured in Step 1.2 (the raw glue:GetDevEndpoint response) as JSON to S3 — default s3://<a bucket the runtime role can write>/glue-devendpoint-backups/<name>-<region>.json; ask the user for the bucket if none is evident. This is the rebuild record: it captures RoleArn, GlueVersion, WorkerType/NumberOfWorkers, SubnetId, SecurityGroupIds, Arguments, ExtraPythonLibsS3Path, ExtraJarsS3Path, and PublicKeys, so the endpoint can be recreated with glue:CreateDevEndpoint if the migration must be rolled back. Confirm the s3:PutObject succeeded before proceeding.

5.3. On confirmation and a confirmed backup: glue:DeleteDevEndpoint(EndpointName=<name>). Remove any endpoint-specific scaffolding the migration added (registered SSH public keys, temporary Elastic IPs).

5.4. Output the result:

MIGRATION RESULT: SUCCESS
Dev endpoint: <name>  (Glue <ver>)  -> DELETED
Definition backup: s3://<bucket>/glue-devendpoint-backups/<name>-<region>.json
Interactive session: <id>  (Glue 4.0)
Access method: <notebook|IDE|REPL|docker>
Code upgrade: <none | via glue-09-10-migration>
Validation: PASSED (output matched)
Idle timeout: <n> min

Gotchas

  • Interactive sessions cannot run Glue 0.9/1.0. If the code is version-specific, upgrading it to Glue 3.0+ is a prerequisite, not optional. Delegate to glue-09-10-migration.
  • Two IAM principals. Missing iam:PassRole on the client principal is the most common CreateSession/AccessDenied failure. The runtime role alone is not enough.
  • Always set --idle-timeout. Dev endpoints never timed out and billed 24/7. A session with no idle timeout reintroduces that cost. Default 30 min.
  • VPC access changes shape. Raw SubnetId + SecurityGroupIds become a named Glue connection referenced by %connections. There is no raw-subnet session arg.
  • No SSH successor. If the developer relied on SSH into the endpoint, there is no session equivalent — route them to the Glue Docker image for local development.
  • The C-extension limitation is lifted. Dev endpoints rejected C-extension Python libs (e.g. pandas); %additional_python_modules supports PyPI and S3 wheels.
  • Decommission is destructive and last. Never delete the dev endpoint before the session is validated and the user confirms. It is the only rollback.
  • Back up the dev endpoint definition to S3 before deleting. A deleted dev endpoint is unrecoverable; the saved JSON config is the only way to recreate it via glue:CreateDevEndpoint. MUST NOT skip, even when the user says "just delete it."
  • DynamicFrame.fromDF emits a benign UserWarning on Spark 3.x ("DataFrame constructor is internal"). It is not an error; output is unaffected.

Troubleshooting

ErrorCauseFix
AccessDeniedException on CreateSessionClient principal lacks session API perms or iam:PassRoleAttach AWSGlueConsoleFullAccess (or session API perms) AND iam:PassRole on the runtime role to the client principal
CreateSession fails on runtime roleRuntime role missing glue.amazonaws.com trust or Glue permissionsReuse the dev endpoint's RoleArn, or attach AWSGlueServiceRole with the Glue trust policy
Statement State=ERROR with IllegalArgumentException/SyntaxError at startCode has Glue 0.9/1.0 (Python 2 / Spark 2.x) constructsUpgrade the code to Glue 3.0+ first via glue-09-10-migration, then re-run
No FileSystem for scheme: hdfsScript uses HDFS (not present in Glue 3.0+)Repoint to S3; covered by glue-09-10-migration HDFS_PATH handling
Session works but cannot reach a VPC data storeNo Glue connection attachedCreate a Glue connection for the subnet/SGs and pass it via %connections / --connections
Session already exists on CreateSessionAn earlier session with the same --id is still alivePick a new --id, or glue:DeleteSession the stale one first

References

  • references/migration-mapping.md — full config mapping, access-method decision table, IAM two-principal setup, code-compatibility notes.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Migrate Glue Devendpoint To Interactive Sessions?

Migrate a legacy AWS Glue development endpoint to a Glue interactive session, following the official AWS migration checklist. Inventories the dev endpoint config, maps it to an equivalent interactive session (runtime role, Glue version, workers, VPC connection, idle timeout), provisions the session, validates by running the developer's Spark/PySpark code, and deletes the dev endpoint after the user confirms. Use when: migrate glue dev endpoint, move off dev endpoints, dev endpoint to interactive sessions, replace glue dev endpoint, glue dev endpoint deprecated, modernize glue dev environmen...

Firwat Migrate Glue Devendpoint To Interactive Sessions op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Migrate Glue Devendpoint To Interactive Sessions besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Migrate Glue Devendpoint To Interactive Sessions an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/aws-samples/aws-glue-samples/tree/master/utilities/skills/migrate-glue-devendpoint-to-interactive-sessions an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Migrate Glue Devendpoint To Interactive Sessions benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Migrate Glue Devendpoint To Interactive Sessions benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Migrate Glue Devendpoint To Interactive Sessions domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Migrate Glue Devendpoint To Interactive Sessions gratis?

Jo. aws-samples huet de Skill ënner der Lizenz MIT-0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇